Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: MySQL

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1


    Hi guys, it appears I recently borked mysql a bit. I recently uninstalled it using pacman -R and reinstalled it. Now when I try and start it using rc.d start mysqld it simply gives me a big FAIL.

    I went to look in my hostname.err file and found that it doesn't exist. I don't know if this is related bu I also was using PHPmyAdmin and accidentally deleted all users associated with it. I've tried reading the Arch wiki and nothing seems to help. No matter what it fails when I try to start the daemon. Also, if I try systemctl enable mysql.service I get this error:
    Failed to issue method call: No such file or directory
    Not sure what I did but it seems the uninstall messed it up somehow.

    EDIT: Oops, I was entering the systemctl command wrong. After I entered it properly it worked without error, however, there still seems to be an error with phpmyadmin. I accidentally deleted all of the root users. I was able to create a new user labeled 'root' but when I check the permissions I am not able to grant full permissions to the root user. It gives me an error:
    #1045 Access denied for user 'root'@'localhost' (using password: YES)
    This is also the same error I get when trying to add a new user altogether. I remember there was three root users and now there is only one user total named root but doesn't seem to have root privileges. I'm not sure how to restore them.

    So just to recap because this post might be scattered:

    I can't grant full privileges in phpmyadmin and..

    I can't locate my hostname.err in /var/lib/mysql. Also it appears that there is no /etc/init.d/mysql
    Last edited by jdos1; 10-25-2012 at 11:29 PM.

  2. #2
    Quote Originally Posted by jdos1 View Post
    Hi guys, it appears I recently borked mysql a bit. I recently uninstalled it using pacman -R and reinstalled it.
    Why did you do that ?

    About the loss of your administrator account, the best you can do is :
    -RTFM at MySQL :: The world's most popular open source database
    -save your data residing on your PC (refer to previous point to know where it's stored, a clue : mysqldump)
    -remove mysql
    -remove all the data directories
    -install mysql
    -restore the lost databases.

  3. #3
    At this point I'm not even sure WHAT is wrong. I am able to login to mysql. I login using: mysql -p -u root and it works. One thing I noticed, however, is that no matter what SQL query I enter it says that there is an error in the SQL syntax, even if I copy/paste correct syntax from the web.

    I accidentally deleted the admin account in phpMyAdmin, it appears the root account for mysql is fine. There still seems to be something wrong with mysql though. Here's something I entered in:
    mysql> mysql --user=root@localhost --password=mypass
    And the error I get is:
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql --user=root@localhost --password=mypass
    mypassword' at line 1
    So I tried to backup all databases anyway using this command:
    mysqldump -u root -ptmppassword --all-databases > /tmp/all-database.sql
    And this is the error I get:
    mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

  4. $spacer_open

Posting Permissions

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