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:
Not sure what I did but it seems the uninstall messed it up somehow.
Failed to issue method call: No such file or directory
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:
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.
#1045 Access denied for user 'root'@'localhost' (using password: YES)
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
Why did you do that ?
Originally Posted by jdos1
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 all the data directories
-restore the lost databases.
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:
And the error I get is:
mysql> mysql --user=root@localhost --password=mypass
So I tried to backup all databases anyway using this command:
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
And this is the error I get:
mysqldump -u root -ptmppassword --all-databases > /tmp/all-database.sql
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect