简体   繁体   中英

mySQL won't start, I think my server was interrupted

Complete novice here - I have a website on my local server I am trying to access made through wordpress and haven't had a problem with it up until now. I think my server was reset and then mySQL stopped connecting.

I followed the following advice that I found on here after a few command prompts that didn't work,

"I have recently encountered this problem on Mac OS Sierra too. Apache server is working but mysql is not. After searching for a solution, reading lots of posts I found this solution. And it worked!

The solution is to navigate to the mysql folder, in my case its,

/Applications/MAMP/db/mysql56/

and remove all the files except folders. Then restart MAMP again."

After this mySQL does activate and it brings me to the installation process again. Once I run through the installation process and click continue I get this..

WordPress database error: [Table 'greenscapeprojects.wp_users' doesn't exist] CREATE TABLE wp_users ( ID bigint(20) unsigned NOT NULL auto_increment, user_login varchar(60) NOT NULL default '', user_pass varchar(255) NOT NULL default '', user_nicename varchar(50) NOT NULL default '', user_email varchar(100) NOT NULL default '', user_url varchar(100) NOT NULL default '', user_registered datetime NOT NULL default '0000-00-00 00:00:00', user_activation_key varchar(255) NOT NULL default '', user_status int(11) NOT NULL default '0', display_name varchar(250) NOT NULL default '', PRIMARY KEY (ID), KEY user_login_key (user_login), KEY user_nicename (user_nicename), KEY user_email (user_email) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci

Now the above error goes on and on for pages and at the very bottom I get, Success!

Wordpress has been installed

Username

Password

"Log in"

Once I click log in this is my next error

Not Found

The requested URL /wp-login.php was not found on this server.

I have since deleted the new files and replaced them back with the original from my mySQL folder and i'm back to the start, with it not connecting.

Once I try /phpmyadmin on my local host I get this.

Welcome to phpMyAdmin

Error MySQL said: Documentation

2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured).

mysqli_real_connect(): (HY000/2002): No such file or directory Retry to connect

Can anyone help and if possible in a way someone who doesn't understand code can read?

Thank you very much for your time, Mike

Coming from a linux background so I might be slightly off..

The mysql56 directory would have contained the socket file used to connect to mysql, giving the 2002 error you have at the bottom.

I think in your case, if you can uninstall and re-install from scratch you will end up in a much cleaner position. I think deleting all the files in the mysql56 directory was a bad suggestion, there are table mapping files there I think...

The alternative is to Recreate the mysql socket file , but as a Novice I think your best bet is to do a clean new installation to keep things simple.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM