Re: .\ibdata1 can't be opened in read-write mode
Posted by:
Dan Godoy
Date: January 10, 2015 11:46PM
Now I'm getting somewhere! I stopped trying to use the --console option which seems to conflict with the --defaults-file option (I'd still love to understand why). So, I was just running mysqld --defaults-file=[blah blah], exactly as the MySQL56 service would run when Windows launches. Then i found a .err file in the data directory that was getting some output:
2015-01-10 23:27:59 5884 [Note] Plugin 'FEDERATED' is disabled.
C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqld.exe: Table 'mysql.plugin' doesn't exist
2015-01-10 23:27:59 5884 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2015-01-10 23:27:59 20 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2015-01-10 23:27:59 5884 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-01-10 23:27:59 5884 [Note] InnoDB: The InnoDB memory heap is disabled
2015-01-10 23:27:59 5884 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-01-10 23:27:59 5884 [Note] InnoDB: Memory barrier is not used
2015-01-10 23:27:59 5884 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-01-10 23:27:59 5884 [Note] InnoDB: Not using CPU crc32 instructions
2015-01-10 23:27:59 5884 [Note] InnoDB: Initializing buffer pool, size = 229.0M
2015-01-10 23:27:59 5884 [Note] InnoDB: Completed initialization of buffer pool
2015-01-10 23:27:59 5884 [Note] InnoDB: Highest supported file format is Barracuda.
2015-01-10 23:28:00 5884 [Note] InnoDB: 128 rollback segment(s) are active.
2015-01-10 23:28:00 5884 [Note] InnoDB: Waiting for purge to start
2015-01-10 23:28:00 5884 [Note] InnoDB: 5.6.21 started; log sequence number 4876126
2015-01-10 23:28:00 5884 [Note] Server hostname (bind-address): '*'; port: 3306
2015-01-10 23:28:00 5884 [Note] IPv6 is available.
2015-01-10 23:28:00 5884 [Note] - '::' resolves to '::';
2015-01-10 23:28:00 5884 [Note] Server socket created on IP: '::'.
2015-01-10 23:28:00 5884 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
So, mysql.plugin didn't exist, and neither did mysql.user table. I tried running mysql_upgrade as the error message suggested, but that failed. So I ran the upgrade GUI tool. That ran successfully. Now I'm able to launch mysqld with the correct defaults file!
Ok, so with the service running, I then opened another prompt and did "mysql --defaults-file="C:\.. ..my.ini". Got a good connection, so I did "show databases". I see only two databases, one called information_schema, and one called "test". I think I set up that "test" database the first day i installed MySQL. But I don't see my other databases, which are the ones i actually care about. When I type "use godoy" (a database i want to connect to), I get Access denied for user ''@'localhost'. Also, it never gives me the password challenge.
Feeling really close, but definitely stuck on my own. Any other tips?
Thanks,
Dan