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-02-2003, 05:26 AM
|
#1
|
Member
Registered: Aug 2003
Distribution: Redhat 9.0, Fedora Core, Suse 9.1, Mandrake
Posts: 82
Rep:
|
MySQl: small problems
Hi all,
I have installed mySQL on a RedHat 8 distribution but encounter some small problems:
I do
[root@thorgal /]# mysql_install_db
[root@thorgal /]# safe_mysqld & (it returns sth like: [1] 4310
[root@thorgal /]# mysqladmin -u root password 'blabla'
So far so good, I think. Then when I want to test the installation, I get:
[root@thorgal /]# mysqlshow -p
Enter password:
mysqlshow: Access denied for user: 'root@localhost' (Using password: YES)
I don't want to connect as root@localhost but as root@thorgal. I'm logged in as root in my system.
Anyone knows the solution to this problem. It's frustrating, I have the feeling I'm very close...
Thanks in advance to all,
Wim Wauters
|
|
|
08-02-2003, 05:29 AM
|
#2
|
Member
Registered: Jul 2002
Location: San Antonio, Texas
Distribution: Slackware
Posts: 31
Rep:
|
try this:
mysql -h <your host> -p
also, you can add your host in /etc/hosts, for example:
1.2.3.4 host host.domain.tld
NetrixTardis
Last edited by NetrixTardis; 08-02-2003 at 05:30 AM.
|
|
|
08-02-2003, 08:06 AM
|
#3
|
Member
Registered: Aug 2003
Distribution: Redhat 9.0, Fedora Core, Suse 9.1, Mandrake
Posts: 82
Original Poster
Rep:
|
Hi,
My hostname is thorgal
To be short (the output is below if of interest):
When doing mysql -h thorgal -p => it does not work
When doing mysql -h localhost -p => it does work (i get the mysql prompt)
=> essentially localhost and thorgal should be the same...
The question is why it does not work with my hostname. At the end I get a mysql prompt, but as what am I connected. I never set a password for localhost...
I'm using BIND9 and thorgal.wauters-mannaert.be is resolving correctly on all my machines. That's why I'm putting nothing in the hosts file.
The complete output is below. Any feedback is highly appreciated...
-----------------------------------------------------------------------------------
When I do the following in chronological order, I get:
[root@thorgal /]# safe_mysqld &
[2] 1677
[root@thorgal /]# A mysqld process already exists
[2]+ Exit 1 safe_mysqld
[root@thorgal /]# mysqladmin -u root password 'wauters'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
[root@thorgal /]# mysqladmin -u thorgal password 'wauters'
mysqladmin: unable to change password; error: 'Access denied for user: '@localhost' to database 'mysql''
[root@thorgal /]# mysql -h thorgal -p
Enter password:
/usr/bin/safe_mysqld: line 273: 1638 Segmentation fault $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking >>$err_log 2>&1
Number of processes running now: 1
ERROR 2013: Lost connection to MySQL server during query
[root@thorgal /]# mysqld process hanging, pid 1641 - killed
030802 14:56:38 mysqld restarted
[root@thorgal /]# mysql -h localhost -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.52
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
|
|
|
All times are GMT -5. The time now is 07:56 PM.
|
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
|
|