+ Post New Thread
Results 1 to 11 of 11
*nix Thread, mysql headaches in Technical; it stopped working recently and its probably related to an update ive done however i cannot get it to run ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199

    mysql headaches

    it stopped working recently and its probably related to an update ive done

    however i cannot get it to run

    Code:
    start mysql
    command either hangs or just says starting
    Code:
    ps aux
    shows no mysql process
    Code:
    mysql -u root
    shows the following error:

    Code:
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    spent the obligatory few hours on Google and tried all the fixes and recommendations i could try but cant figure this one out by myself

  2. #2

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,799
    Thank Post
    272
    Thanked 1,134 Times in 1,030 Posts
    Rep Power
    349
    open a putty session and tail -f /var/log/mysql (i think its that path). In another windows tail -f /var/log/syslog and in another run the start mysql - can you paste up any errors.

  3. #3

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    Code:
    root@ubuntu:~# tail -f /var/log/mysql/error.log
    120704 10:53:52 [Note] Plugin 'FEDERATED' is disabled.
    120704 10:53:52  InnoDB: Initializing buffer pool, size = 8.0M
    120704 10:53:52  InnoDB: Completed initialization of buffer pool
    120704 10:53:52  InnoDB: Started; log sequence number 0 44233
    120704 10:53:52 [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect file format 'host'
    Code:
    root@ubuntu:~# tail -f /var/log/messages
    Jul  4 10:49:50 ubuntu kernel: [ 1453.669824] type=1505 audit(1341395390.222:51):  operation="profile_replace" pid=4082 name="/usr/sbin/mysqld"
    Jul  4 10:50:20 ubuntu kernel: [ 1484.023990] type=1505 audit(1341395420.582:52):  operation="profile_replace" pid=4162 name="/usr/sbin/mysqld"
    Jul  4 10:50:50 ubuntu kernel: [ 1514.349155] type=1505 audit(1341395450.902:53):  operation="profile_replace" pid=4242 name="/usr/sbin/mysqld"
    Jul  4 10:51:21 ubuntu kernel: [ 1544.721736] type=1505 audit(1341395481.282:54):  operation="profile_replace" pid=4323 name="/usr/sbin/mysqld"
    Jul  4 10:51:51 ubuntu kernel: [ 1575.053669] type=1505 audit(1341395511.612:55):  operation="profile_replace" pid=4403 name="/usr/sbin/mysqld"
    Jul  4 10:52:21 ubuntu kernel: [ 1605.362550] type=1505 audit(1341395541.922:56):  operation="profile_replace" pid=4483 name="/usr/sbin/mysqld"
    Jul  4 10:52:52 ubuntu kernel: [ 1635.679838] type=1505 audit(1341395572.232:57):  operation="profile_replace" pid=4582 name="/usr/sbin/mysqld"
    Jul  4 10:53:22 ubuntu kernel: [ 1665.998682] type=1505 audit(1341395602.552:58):  operation="profile_replace" pid=4670 name="/usr/sbin/mysqld"
    Jul  4 10:53:52 ubuntu kernel: [ 1696.292778] type=1505 audit(1341395632.852:59):  operation="profile_replace" pid=4750 name="/usr/sbin/mysqld"
    Jul  4 10:54:23 ubuntu kernel: [ 1726.648335] type=1505 audit(1341395663.202:60):  operation="profile_replace" pid=4831 name="/usr/sbin/mysqld"
    Code:
    root@ubuntu:/var/log# ls -l | grep mysq
    drwxr-s--- 2 mysql     adm         4096 2012-03-16 06:25 mysql
    -rw-r----- 1 mysql     adm            0 2012-07-04 09:31 mysql.err
    -rw-r----- 1 mysql     adm            0 2012-07-04 09:31 mysql.log
    Code:
    root@ubuntu:/var/log# tail -f /var/log/syslog
    Jul  4 10:53:52 ubuntu init: mysql post-start process (4675) terminated with status 1
    Jul  4 10:53:52 ubuntu kernel: [ 1696.292778] type=1505 audit(1341395632.852:59):  operation="profile_replace" pid=4750 name="/usr/sbin/mysqld"
    Jul  4 10:53:52 ubuntu init: mysql main process (4754) terminated with status 1
    Jul  4 10:53:52 ubuntu init: mysql main process ended, respawning
    Jul  4 10:54:23 ubuntu init: mysql post-start process (4755) terminated with status 1
    Jul  4 10:54:23 ubuntu kernel: [ 1726.648335] type=1505 audit(1341395663.202:60):  operation="profile_replace" pid=4831 name="/usr/sbin/mysqld"
    Jul  4 10:54:23 ubuntu init: mysql main process (4835) terminated with status 1
    Jul  4 10:54:23 ubuntu init: mysql main process ended, respawning
    Jul  4 10:54:53 ubuntu init: mysql post-start process (4836) terminated with status 1
    Jul  4 11:00:01 ubuntu CRON[4937]: (root) CMD (/etc/cron.hourly/gettv.sh)
    Last edited by RabbieBurns; 4th July 2012 at 11:09 AM.

  4. #4

    Join Date
    Nov 2010
    Posts
    433
    Thank Post
    58
    Thanked 66 Times in 57 Posts
    Rep Power
    27
    Last line in error.log - the priviledge table is broke so mysql won't start.

    Have you seen the last answer in Answer : Bug#411672: mysql-server-5.0: Incorrect file format 'host' ?

  5. Thanks to mats from:

    RabbieBurns (4th July 2012)

  6. #5

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    Quote Originally Posted by mats View Post
    Last line in error.log - the priviledge table is broke so mysql won't start.

    Have you seen the last answer in Answer : Bug#411672: mysql-server-5.0: Incorrect file format 'host' ?
    if I run
    Code:
    mysqld --skip-grant
    I can login. But im not sure what to do to fix it?

    I tried a
    Code:
    mysql> repair table columns_priv use_frm;
    +--------------------+--------+----------+----------+
    | Table              | Op     | Msg_type | Msg_text |
    +--------------------+--------+----------+----------+
    | mysql.columns_priv | repair | status   | OK       |
    +--------------------+--------+----------+----------+
    and then create a new user like it said, but get
    Code:
    mysql> CREATE USER 'robert'@'localhost' IDENTIFIED BY .... ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-ta       bles option so it cannot execute this statement
    any ideas?

  7. #6

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,799
    Thank Post
    272
    Thanked 1,134 Times in 1,030 Posts
    Rep Power
    349
    This may also help but appears to be after a host crash?

    MySQL :: Canīt open and lock privilege tables: Incorrect file format 'host'

  8. #7

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    ok ive repaired all the tables but struggling to create a new user using Insert..
    Code:
    mysql> insert into user values('localhost','root','password','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
    ERROR 1136 (21S01): Column count doesn't match value count at row 1

  9. #8

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,799
    Thank Post
    272
    Thanked 1,134 Times in 1,030 Posts
    Rep Power
    349
    That looks as though there is two many values i.e how many cols are in that table? You need as many Y's as there are columns

  10. #9

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    I lost my ssh session and now I cant get back into mysql as the user table is empty and I never managed to make a new one.

    Is there any way of editing in a user via nano or such?

  11. #10

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,512
    Thank Post
    1,320
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    ok gave up and uninstalled it and reinstalled it and its fixed it. its kept my databases as well but i cant remember what users went with each database so ill need to fix a lot up but at least im in and its running

  12. #11

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,799
    Thank Post
    272
    Thanked 1,134 Times in 1,030 Posts
    Rep Power
    349
    Thats a touch annoying but at least its working!

SHARE:
+ Post New Thread

Similar Threads

  1. Exchange headaches
    By steelrazor in forum How do you do....it?
    Replies: 8
    Last Post: 24th April 2006, 08:04 AM
  2. MySQL Network access
    By _Bob_ in forum *nix
    Replies: 5
    Last Post: 6th April 2006, 01:30 PM
  3. Office 2003 install headache
    By pooley in forum Windows
    Replies: 8
    Last Post: 2nd November 2005, 04:52 PM
  4. Php/MySQL Web Design
    By Adam in forum How do you do....it?
    Replies: 8
    Last Post: 18th July 2005, 04:13 PM
  5. php MySql
    By iking in forum Books and Manuals
    Replies: 0
    Last Post: 11th July 2005, 03:35 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •