Solved

Install mysql-3.23.49 to redhat 7.2

Posted on 2002-04-09
15
451 Views
Last Modified: 2011-10-03
Hi experts,

I am trying to install this from the source but can't seem to get it working properly.  I probably missed some steps from the install manual:

cd /usr/local/mysql-3.23.49
groupadd mysql
useradd -g mysql mysql
./configure --prefix=/usr/local/mysql
make
make install
scripts/mysql_install_db
chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql
cp support-files/my-medium.cnf /etc/my.cnf
/usr/local/mysql/bin/safe_mysqld --user=mysql &

I am getting confused as to when i put this in:
/usr/local/mysql/bin/mysqladmin -u root -p password 'new-password'
and
/usr/local/mysql/bin/mysqladmin -u root -h mywebsite.com -p password 'new-password'

I get all these error but am not expert enough to figure how to fix it:
/tmp/mysql.sock error
and
/usr/local/mysql/bin/mysqladmin -u mysql -p password 'mypassword'
Enter password:
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'mysql@localhost' (Using password: YES)'

What I am looking for is the exact command lines to install mysql from scratch and to set it up with a password protection for root & any users.

I have a gateway 6400 server, 8GB HDD, 512MB ram.

Thanks in advance.
LL
0
Comment
Question by:larry718
  • 6
  • 4
  • 2
  • +2
15 Comments
 
LVL 6

Accepted Solution

by:
kotan earned 38 total points
Comment Utility
>/usr/local/mysql/bin/mysqladmin -u root -p password 'new-password'

no space between -p and password

then should be
/usr/local/mysql/bin/mysqladmin -u root -ppassword 'new-password'
0
 
LVL 1

Author Comment

by:larry718
Comment Utility
Hi kotan,

I have tried that command, i get this error:
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'

...What I am looking for is the exact command lines to install mysql from scratch and to set it up with
a password protection for root & any users, Thanks.
0
 
LVL 5

Assisted Solution

by:Peewee
Peewee earned 37 total points
Comment Utility
larry718,
the easiest way to install mysql is via rpm packages.  If you wish to install this way go to and do a search for the two mysql packages:

http://www.rpmfind.net/

As for securing your database mysql has designated scripts which you can use for this.  After you've installed mysql got to the bin directory where mysql is and do a ls my* and you will see a list of mysql utilities, which inlcude mysqlacess and mysql_setpermission - Both of these utilities will be of use to you here for securing your database..

let me know if you need any more help
regards
Peewee
0
 
LVL 1

Author Comment

by:larry718
Comment Utility
I got it to work myself, somehow this works:

./mysql

then go in and set the root password

then exit and type:

./mysql -u root -p
enter password.
and I am in the database again.

Okay now that it works I will like to award these points to whoever can tell me how to properly set it up so that different user can log in:  ie:

users:
======
root
user1
user2
user3...

thanks experts!
0
 
LVL 5

Expert Comment

by:Peewee
Comment Utility
larry718,

use mysql_setpermission it is designed to create user relationships with a database:

let me know if you need more help..
regards
Peewee
=================================

Usage: mysql_setpermission  
and enter root
password if any for mysql.

Then choose from the menu:
######################################################################
## Welcome to the permission setter 1.2 for MySQL.
## made by Luuk de Boer
######################################################################
What would you like to do:
  1. Set password for a user.
  2. Add a database + user privilege for that database.
     - user can do all except all admin functions
  3. Add user privilege for an existing database.
     - user can do all except all admin functions
  4. Add user privilege for an existing database.
     - user can do all except all admin functions + no create/drop
  5. Add user privilege for an existing database.
     - user can do only selects (no update/delete/insert etc.)
  0. exit this program
 
Make your choice [1,2,3,4,5,0]:
0
 
LVL 1

Author Comment

by:larry718
Comment Utility
I got this:
# ./mysql_setpermission
Can't locate DBI.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at ./mysql_setpermission line 27.
BEGIN failed--compilation aborted at ./mysql_setpermission line 27.

# ./mysql_setpermission -u root -p
Can't locate DBI.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at ./mysql_setpermission line 27.
BEGIN failed--compilation aborted at ./mysql_setpermission line 27.
# ./mysql_setpermission -u root
Can't locate DBI.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at ./mysql_setpermission line 27.
BEGIN failed--compilation aborted at ./mysql_setpermission line 27.
0
 
LVL 1

Author Comment

by:larry718
Comment Utility
line 27 says:

use DBI;

am i missing this?
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 5

Expert Comment

by:Peewee
Comment Utility
larry718,
looks like if depends upon the DBI module.  This is a perl thing.  This is easy to intsall:

method one:

at the command line simply type:
perl -MCPAN -eshell

(At this point if you've  never used this before you will ne4ed to fill out the default values for various utilities).
 
and then when the CPAN command prompt comes up:

install DBI;

and then variuous install messages will be displayed.

or
method two:
go to: http://search.cpan.org/search?dist=DBI

downlaod the .tar.gz distribution and unzip & tar it and do a perl Makefile, then make, make test, make install.


let me know if you need more help.

regards
Peewee
0
 
LVL 5

Expert Comment

by:Peewee
Comment Utility
larry718,
did you get the answer you were looking for?


regards Peewee
0
 
LVL 5

Expert Comment

by:Peewee
Comment Utility
larry718,

did you get the answer you were looking for?


regards Peewee
0
 

Expert Comment

by:modulo
Comment Utility
Dear: Peewee

I've rejected your proposed answer as Experts Exchange holds an experiment to work without the answer button.

See:        http://www.experts-exchange.com/jsp/communityNews.jsp
Paragraph: Site Update for Wednesday, November 06, 2002

By this rejection the Asker will be notified by mail and hopefully he will take his responsibility to finalize the question or post an additional comment.
The Asker sees a button beside every post which says "Accept This Comment As Answer" (including rejected answers) -- so if he/she thinks yours is the best, you'll be awarded the points and the grade.

Thanks !

modulo

Community Support Moderator
Experts Exchange
0
 
LVL 5

Expert Comment

by:Peewee
Comment Utility
i would imagine after this amount of time the question is dead.  But i agree the question needs to be resolved and it is up to larry718 to do this..

regards Peewee
0
 

Expert Comment

by:modulo
Comment Utility
I agree Peewee, just hope he/she reacts on the three email notif's, otherwise we'll have to wait for a cleanup expert to propose the way the Q can be finalized....
We don't have one yet for this TA :(
The main TA Databases and Access are covered and also some others (check the link in Q: http://www.experts-exchange.com/Community_Support/CleanUp/Q_20319784.html)
Perhaps interested ?

modulo

Community Support Moderator
Experts Exchange
0
 
LVL 17

Expert Comment

by:Squeebee
Comment Utility
larry718,
No comment has been added lately (376 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: split points between kotan http:#6927683 and Peewee http:#6941472

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

Squeebee
EE Cleanup Volunteer
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MySql Database Installation 5 75
mysql copy entire column to a new one 3 40
MySQL 11 66
Best database setup for image uploads 6 38
Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now