LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-22-2003, 03:17 PM   #1
gbg
Member
 
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55

Rep: Reputation: 15
Unhappy MySQL access problems!


I have a mysql server running at my redhat 9 box. The problem is that and dont know what hosts are allowed to access the mysql. I have root access to the machine and the root password of the mysql DB. Any ideas?
 
Old 08-22-2003, 03:23 PM   #2
Cooner
Member
 
Registered: Jul 2003
Location: Hastings, MN. USA
Distribution: Ubuntu 10.xx
Posts: 109

Rep: Reputation: 15
Until other users are added by root only root has access.
mysql -u root -p
 
Old 08-22-2003, 03:42 PM   #3
gbg
Member
 
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55

Original Poster
Rep: Reputation: 15
access denied for user root@localhost (using password: YES). The problem is that and don't what hosts are allowed to access the database. That way doesn't work...
 
Old 08-22-2003, 03:47 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Did you set up mySQL according to these instructions? A lot of people skip setting up a mysql database and you need to.

The other possibility is that root doesn't have a password set in which case you should be able to use

mysql -u root
 
Old 08-22-2003, 03:54 PM   #5
gbg
Member
 
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55

Original Poster
Rep: Reputation: 15
i set up everything right... the problem is that I changed the hostname of the server and a i cannot remember.
 
Old 08-22-2003, 04:05 PM   #6
Cooner
Member
 
Registered: Jul 2003
Location: Hastings, MN. USA
Distribution: Ubuntu 10.xx
Posts: 109

Rep: Reputation: 15
OK try this:
su
password
chown -R mysql /var/lib/mysql
chgrp -R mysql /var/lib/mysql
 
Old 08-22-2003, 04:11 PM   #7
gbg
Member
 
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55

Original Poster
Rep: Reputation: 15
duh?! The owner and the group are already mysql. That never solve my problem. I have permissions, don't have are the allowed hosts to access the mysql database. By default the mysql server installs 2 db, the mysql and test. On mysql db you have a table user, on user you have several fields, user, host and many previleges. I dont know are the user/host combination. GRRR
 
Old 08-22-2003, 04:13 PM   #8
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Hmm. You might try mysql -u root@olddomainname -p and see if that gets you in (I doubt it though).

You also might try resetting the root password. The procedure is here .


Also, take a read through this .
 
Old 08-22-2003, 04:20 PM   #9
Cooner
Member
 
Registered: Jul 2003
Location: Hastings, MN. USA
Distribution: Ubuntu 10.xx
Posts: 109

Rep: Reputation: 15
Sorry every time I have installed MySQL and got it running (about 30 or so) /var/lib/mysql were owned by root and it needed to be changed to even start the server.
It is running right? mysqladmin -p ping
 
Old 08-22-2003, 04:34 PM   #10
gbg
Member
 
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55

Original Poster
Rep: Reputation: 15
yep... this last one worked fine. Thanx all and hangdog!
 
Old 08-22-2003, 04:38 PM   #11
gbg
Member
 
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55

Original Poster
Rep: Reputation: 15
sorry, not the last, the previous one.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock) neocookie Linux - Software 8 02-08-2008 12:48 AM
How access MySQL by MySQL Administrator? treotan Linux - Newbie 5 12-04-2004 11:17 PM
MySQl access from C++ rob99 Programming 6 06-23-2003 02:25 PM
mysql and access mychl Programming 2 06-11-2003 07:00 PM
MySQL access denied problems ?? huno Linux - General 1 05-16-2002 11:30 AM


All times are GMT -5. The time now is 01:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration