You are not logged in.

#1 2007-12-22 20:45:07

neXTPeer
Member
Registered: 2007-01-16
Posts: 20

Problem with MySQL (SOLVED)

Hello everybody. I have a problem with my MySQL server. Just installed it, ant when i try to start it:

[root@localhost html]# /etc/rc.d/mysqld start
:: Adding mysql group                                                    [DONE] 
:: Adding mysql user                                                     [DONE] 
Installing MySQL system tables...
ERROR: 1062  Duplicate entry 'localhost-' for key 1
071223 22:35:05 [ERROR] Aborting

071223 22:35:05 [Note] /usr/sbin/mysqld: Shutdown complete

Installation of system tables failed!

I tryed to search some info in google, havent found anything.
Does anybody has some ideas?

Last edited by neXTPeer (2007-12-23 08:38:09)

Offline

#2 2007-12-22 21:22:41

neXTPeer
Member
Registered: 2007-01-16
Posts: 20

Re: Problem with MySQL (SOLVED)

Tryed to remove /var/lib/mysql tables, and run
# mysql_install_db --datadir=/var/lib/mysql
But same happens...

Offline

#3 2007-12-22 21:27:36

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Problem with MySQL (SOLVED)

did you alter the my.cnf at all?
seems it is complaining about a duplicate entry 'localhost-'

*shrugs*
haven't seen that error before.

you might also check your hostname, in /etc/hosts
see if anything looks unusual in there..
(not exactly sure where mysql gets some of its initial hostname type data from)


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#4 2007-12-22 21:51:15

neXTPeer
Member
Registered: 2007-01-16
Posts: 20

Re: Problem with MySQL (SOLVED)

No, i havent changed anything in my.cnf (i have no idea, what i need to change).

/etc/hosts seems good(I think...)

127.0.0.1 myhost.domain.org localhost.localdomain localhost myhost

neutral

Offline

#5 2007-12-23 08:37:54

neXTPeer
Member
Registered: 2007-01-16
Posts: 20

Re: Problem with MySQL (SOLVED)

Problem solved. hostname in rc.conf can't be localhost.

Offline

#6 2008-02-07 01:49:01

Vrieskist
Member
From: Netherlands
Registered: 2007-01-10
Posts: 5

Re: Problem with MySQL (SOLVED)

I have a huge problem, it seems I can't login to my own mysql server hmm

mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

The first time I started mysqld I got the same error as above. The script that should create an account stopped. Because of this I didn't set a root password. I think I never set a root password, but somehow mysqld expects one.

Could someone help?

btw: my host in rc.conf is not localhost and it's corresponding with the hostname in /etc/hosts

-edit--
I just tried these steps: http://dev.mysql.com/doc/refman/5.0/en/ … sions-unix
But this also didn't work sad

--edit2--
Seems that there isn't a root account at all! hmm

Last edited by Vrieskist (2008-02-07 02:21:24)

Offline

#7 2008-09-16 18:42:04

badbrain
Member
From: germany
Registered: 2008-04-08
Posts: 7

Re: Problem with MySQL (SOLVED)

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

realy suxx

Offline

#8 2008-09-17 13:28:45

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: Problem with MySQL (SOLVED)

Have you tried:

1.  Stop mysqld and restart it with the --skip-grant-tables --user=root options (Windows users omit the --user=root portion).
2.  Connect to the mysqld server with this command:  mysql -u root
3.  Issue the following statements in the mysql client:

mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
mysql> FLUSH PRIVILEGES;

      *Replace "newpwd" with the actual root password that you want to use.

You should be able to connect using the new password.


Matt

"It is very difficult to educate the educated."

Offline

#9 2008-09-22 23:17:24

badbrain
Member
From: germany
Registered: 2008-04-08
Posts: 7

Re: Problem with MySQL (SOLVED)

didnt work...
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

no problems on debian but arch-linux mysql drives me crazy...

Last edited by badbrain (2008-09-22 23:25:12)

Offline

#10 2008-09-22 23:39:40

Ruckus
Member
Registered: 2007-02-17
Posts: 204

Re: Problem with MySQL (SOLVED)

badbrain wrote:

didnt work...
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

no problems on debian but arch-linux mysql drives me crazy...

I'd backup the raw tables of /var/lib/mysql/tablenames by just copying the folders to another directory, then uninstall mysql, and reinstall it. and then just copy the folders back into that directory and you'll be fine.

Offline

#11 2008-09-23 05:44:58

badbrain
Member
From: germany
Registered: 2008-04-08
Posts: 7

Re: Problem with MySQL (SOLVED)

and sometimes...

         just a reboot helps ;-)

Offline

Board footer

Powered by FluxBB