LinuxQuestions.org
Visit Jeremy's Blog.
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, 02: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, 02: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, 02: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, 02:47 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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, 02: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, 03: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, 03: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, 03:13 PM   #8
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
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, 03: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, 03: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, 03: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-07-2008 11:48 PM
How access MySQL by MySQL Administrator? treotan Linux - Newbie 5 12-04-2004 10:17 PM
MySQl access from C++ rob99 Programming 6 06-23-2003 01:25 PM
mysql and access mychl Programming 2 06-11-2003 06:00 PM
MySQL access denied problems ?? huno Linux - General 1 05-16-2002 10:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:38 AM.

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
Open Source Consulting | Domain Registration