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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-22-2003, 02:17 PM
|
#1
|
Member
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55
Rep:
|
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?
|
|
|
08-22-2003, 02:23 PM
|
#2
|
Member
Registered: Jul 2003
Location: Hastings, MN. USA
Distribution: Ubuntu 10.xx
Posts: 109
Rep:
|
Until other users are added by root only root has access.
mysql -u root -p
|
|
|
08-22-2003, 02:42 PM
|
#3
|
Member
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55
Original Poster
Rep:
|
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...
|
|
|
08-22-2003, 02:47 PM
|
#4
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
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
|
|
|
08-22-2003, 02:54 PM
|
#5
|
Member
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55
Original Poster
Rep:
|
i set up everything right... the problem is that I changed the hostname of the server and a i cannot remember.
|
|
|
08-22-2003, 03:05 PM
|
#6
|
Member
Registered: Jul 2003
Location: Hastings, MN. USA
Distribution: Ubuntu 10.xx
Posts: 109
Rep:
|
OK try this:
su
password
chown -R mysql /var/lib/mysql
chgrp -R mysql /var/lib/mysql
|
|
|
08-22-2003, 03:11 PM
|
#7
|
Member
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55
Original Poster
Rep:
|
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
|
|
|
08-22-2003, 03:13 PM
|
#8
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
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 .
|
|
|
08-22-2003, 03:20 PM
|
#9
|
Member
Registered: Jul 2003
Location: Hastings, MN. USA
Distribution: Ubuntu 10.xx
Posts: 109
Rep:
|
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
|
|
|
08-22-2003, 03:34 PM
|
#10
|
Member
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55
Original Poster
Rep:
|
yep... this last one worked fine. Thanx all and hangdog!
|
|
|
08-22-2003, 03:38 PM
|
#11
|
Member
Registered: Aug 2003
Location: Lisbon Portugal
Distribution: Red Hat 9
Posts: 55
Original Poster
Rep:
|
sorry, not the last, the previous one.
|
|
|
All times are GMT -5. The time now is 11:38 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|