LinuxQuestions.org
Help answer threads with 0 replies.
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-02-2003, 05:26 AM   #1
WiWa
Member
 
Registered: Aug 2003
Distribution: Redhat 9.0, Fedora Core, Suse 9.1, Mandrake
Posts: 82

Rep: Reputation: 15
Unhappy 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
 
Old 08-02-2003, 05:29 AM   #2
NetrixTardis
Member
 
Registered: Jul 2002
Location: San Antonio, Texas
Distribution: Slackware
Posts: 31

Rep: Reputation: 25
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.
 
Old 08-02-2003, 08:06 AM   #3
WiWa
Member
 
Registered: Aug 2003
Distribution: Redhat 9.0, Fedora Core, Suse 9.1, Mandrake
Posts: 82

Original Poster
Rep: Reputation: 15
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>
 
  


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
small mySQL problem The_Messiah Linux - Software 3 03-28-2005 06:48 PM
MySQL client in C--small problem zaichik Programming 4 02-04-2005 07:23 AM
FC3- Small MYSQL install kedman Linux - Software 0 11-30-2004 06:32 AM
just a very small mysql.sock question =) xushi Slackware 12 09-23-2004 10:27 AM
3 small problems in 1 small post vzzt! Linux - Software 10 02-27-2003 07:40 PM

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

All times are GMT -5. The time now is 07:56 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
Open Source Consulting | Domain Registration