Problem getting Mysql running
Posted by: justme123456 (---.204.246.7.etisalat.com.eg)
Date: July 23, 2015 02:07PM

Hi,

I have
Wampserver 2.5, Win8 64b.The light i orange..


Apachi server is running ok.

Mysql server is not comming up. Is trying to recover from IO errors.

I tried to recover this with innodb_force_recovery = 1 and also untill 6 .. no luck

I have backups so

I just renamed the : D:\wamp\bin\mysql\mysql5.6.17\data to D:\wamp\bin\mysql\mysql5.6.17\data_old

and made a new folder called D:\wamp\bin\mysql\mysql5.6.17\data

Changed socket 3306 to 3307 but now getting:

Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist


Mysql --console is giving:
2015-07-23 14:04:54 2084 [Note] InnoDB: 5.6.17 started; log sequence number 1607321
2015-07-23 14:04:54 2084 [Note] Server hostname (bind-address): '*'; port: 3307
2015-07-23 14:04:54 2084 [Note] IPv6 is available.
2015-07-23 14:04:54 2084 [Note] - '::' resolves to '::';
2015-07-23 14:04:54 2084 [Note] Server socket created on IP: '::'.
2015-07-23 14:04:54 2084 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist



Mysqladmin is giving:
D:\wamp\bin\mysql\mysql5.6.17\bin>mysqladmin status
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to MySQL server on 'localhost' (10061)'
Check that mysqld is running on localhost and that the port is 3307.
You can check this by doing 'telnet localhost 3307'

Restore is giving..

D:\wamp\bin\mysql\mysql5.6.17\bin>mysql -u root localhost < backupsqldump.sql
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)


What should i do?

Options: ReplyQuote
Re: Problem getting Mysql running
Posted by: RiggsFolly (---.as43234.net)
Date: July 24, 2015 10:49AM

Hello,

Well done for getting so far in attempting to recover the database.

One mistake you made was creating the new D:\wamp\bin\mysql\mysql5.6.17\data folder. So lets start by putting the D:\wamp\bin\mysql\mysql5.6.17\data back where it was.

Oh and also put MySQL back on port 3306!


So stop WAMPServer and

- Delete the new D:\wamp\bin\mysql\mysql5.6.17\data folder
- Copy D:\wamp\bin\mysql\mysql5.6.17\data_old to D:\wamp\bin\mysql\mysql5.6.17\data
copy so you have D:\wamp\bin\mysql\mysql5.6.17\data_old as a backup so you can try again
if this does not work!

WHY put old one back The D:\wamp\bin\mysql\mysql5.6.17\data folder contains a folder called mysql this folder contains a MYISAM database that MYSQL uses to store all its knowledge of databases/tables/columns/users etc etc.

Also D:\wamp\bin\mysql\mysql5.6.17\data contains the ibdata1 (where innodb databases are actually stored and ib_logfile_0 and ib_logfile_1 files, these will be needed as well


So now we need to get MySQL started so we can try a recovery. If MySQL does not start with innodb_force_recovery = 0 try changing it to innodb_force_recovery = 1 or innodb_force_recovery = 2
We just need MYSQL to start and allow us to issue command.

Once MYSQL is started:
Drop all the tables of the database that is causing the problems

Then stop MYSQL and set innodb_force_recovery = 0

Restart MySQL, hopefully it should now restart.

You can now restore your backup to recreate you problem database.



If this does not work please keep a log of any/all error messages and we will try something else.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.