Solved

Install mysql-3.23.49 to redhat 7.2

Posted on 2002-04-09
15
472 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
ID: 6927683
>/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
ID: 6927916
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
ID: 6941472
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 1

Author Comment

by:larry718
ID: 6942458
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
ID: 6944378
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
ID: 6945886
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
ID: 6945915
line 27 says:

use DBI;

am i missing this?
0
 
LVL 5

Expert Comment

by:Peewee
ID: 6947271
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
ID: 6963040
larry718,
did you get the answer you were looking for?


regards Peewee
0
 
LVL 5

Expert Comment

by:Peewee
ID: 6970818
larry718,

did you get the answer you were looking for?


regards Peewee
0
 

Expert Comment

by:modulo
ID: 7428065
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
ID: 7433325
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
ID: 7433558
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
ID: 9803352
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

816 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

12 Experts available now in Live!

Get 1:1 Help Now