Solved

Install mysql-3.23.49 to redhat 7.2

Posted on 2002-04-09
15
488 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SubQuery link 4 54
Formating field inside mysql query 2 45
MySQL Persistent Connections 10 50
SQL Function 4 34
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

738 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