LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2007, 09:27 AM   #1
FWSquatch
Member
 
Registered: Jan 2006
Location: Fort Worth, TX
Distribution: Ubuntu, DSL
Posts: 47

Rep: Reputation: 15
Can't Log in to MySQL after setup


I'm running Freelink (Debian 3.1) on my Buffalo Linkstation and I'm trying to set up MySQL. I followed this walkthrough and downloaded mysql-5.0.41. I was able to get it installed and I can start up the server but I can't login to it. I've tried to log in from the command line and from Webmin with no luck. Here's what happens when I try to login:

Code:
Paragon:/mnt/opt/mysql# bin/mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Paragon:/mnt/opt/mysql#
The same thing happens when I specify the user as mysql.
 
Old 08-13-2007, 09:29 AM   #2
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Can you verify the server is running? If it is try
mysql -u root.
 
Old 08-13-2007, 09:34 AM   #3
FWSquatch
Member
 
Registered: Jan 2006
Location: Fort Worth, TX
Distribution: Ubuntu, DSL
Posts: 47

Original Poster
Rep: Reputation: 15
Yes, it is running. At least I think this means that it is:

Code:
Paragon:/mnt/opt/mysql# /etc/init.d/mysql.server start
Starting MySQL
Paragon:/mnt/opt/mysql# bin/mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
 
Old 08-13-2007, 09:39 AM   #4
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Try:

ps aux | grep mysql

or

ps aux | grep mysqld

One of them should show a few lines with a mysql process. Did you edit my.cnf and move it into place? I am sorry I did not read the link you provided. At any point did you change or add a root password etc? On my machine I can see any error messages printed to /var/db/mysql/ .

substitute HOSTNAME with your machine name. May be a bit different for you, not too sure.

cat /var/db/mysql/HOSTNAME.err

Hope it helps some.
 
Old 08-13-2007, 09:56 AM   #5
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
I just checked on a Linux machine (FC7) and it has its data directory under /var/lib/mysql but it's logs do go to /var/log/mysqld.log . So you may be able to check that for more info. Sorry about that.

Hope it helps some.


Also do a search here on LQ for your problems as there are loads of these questions about mysql processes not starting, running, connection issues etc. Some even by myself ;}

Last edited by lord-fu; 08-13-2007 at 09:59 AM.
 
Old 08-13-2007, 10:01 AM   #6
bzposse
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Rep: Reputation: 0
Have you tried reseting the password ?
However you must start sql server first

/etc/init.d/mysql.server start

/mnt/opt/mysql/bin/mysqladmin -u root password 'new-password'
/mnt/opt/mysql/bin/mysqladmin -u root -h 'servername' password 'new-password'
 
Old 08-13-2007, 10:02 AM   #7
FWSquatch
Member
 
Registered: Jan 2006
Location: Fort Worth, TX
Distribution: Ubuntu, DSL
Posts: 47

Original Poster
Rep: Reputation: 15
Thank you so much for the quick replies. When I do the command "ps aux | grep mysql" I get a lot of entries that look like this:

Code:
mysql      455  0.0 20.8 43672 13056 ?       S    09:49   0:00 /mnt/opt/mysql/libexec/mysqld --basedir=/mnt/opt/mysql --datadir=/mnt/opt/mysql/var --user=mysql --pid-file=/mnt/opt/mysql/var/Paragon.pid --skip-external-locking --port=3306 --socket=/tmp/mysql.sock
root      1267  0.0  0.9  1648  580 pts/0    S+   09:53   0:00 grep mysql
Paragon:/mnt/opt/mysql#
I have my.conf located in the /etc folder and it looks like this (I edited out the commented lines):

Code:
[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
bind-address = 127.0.0.1


server-id       = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout
I did add a user (mysql) and a password. I also added a root password. I could not find a log file in any of those places.
 
Old 08-13-2007, 10:06 AM   #8
FWSquatch
Member
 
Registered: Jan 2006
Location: Fort Worth, TX
Distribution: Ubuntu, DSL
Posts: 47

Original Poster
Rep: Reputation: 15
Thanks for the replies, guys. I just tried what bzposse said and got this:

Code:
Paragon:/var/log# /mnt/opt/mysql/bin/mysqladmin -u root -h 'paragon' password 'new-password'
/mnt/opt/mysql/bin/mysqladmin: connect to server at 'paragon' failed
error: 'Host 'localhost' is not allowed to connect to this MySQL server'
Paragon:/var/log#
Maybe this is the problem? Is it possible that I have a setting that doesn't allow me to use MySQL from localhost?
 
  


Reply



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
mysqld - /var/log/mysql/mysql-bin.index not found robin.w Linux - Software 5 02-10-2011 01:00 AM
can't log in to mysql walterbyrd Linux - Software 2 03-25-2005 05:30 PM
cannot log into mysql jomy Linux - Networking 1 02-27-2005 05:05 AM
MySQL setup stops at command "./configure --prefix=/usr/local/mysql" k41184 Linux - Software 1 05-20-2004 02:44 PM
mysql log? kabads Linux - Software 1 05-15-2003 05:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:10 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