Install mysql-3.23.49 to redhat 7.2

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
LVL 1
larry718Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
kotanConnect With a Mentor Commented:
>/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
 
larry718Author Commented:
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
 
PeeweeConnect With a Mentor Commented:
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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
larry718Author Commented:
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
 
PeeweeCommented:
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
 
larry718Author Commented:
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
 
larry718Author Commented:
line 27 says:

use DBI;

am i missing this?
0
 
PeeweeCommented:
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
 
PeeweeCommented:
larry718,
did you get the answer you were looking for?


regards Peewee
0
 
PeeweeCommented:
larry718,

did you get the answer you were looking for?


regards Peewee
0
 
moduloCommented:
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
 
PeeweeCommented:
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
 
moduloCommented:
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
 
SqueebeeCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.