Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error "table 'mysql.host' doesn't exist" when running on Windows 7 #56

Open
wabson opened this issue Jan 26, 2015 · 4 comments
Open

Comments

@wabson
Copy link

wabson commented Jan 26, 2015

I have version 0.9.0 of the plugin working under Linux and OS X, but under Windows 7 it appears that mysql_install_db.pl does not properly create the required system tables for the MySQL server to be able to start.

[INFO] --- maven-dependency-plugin:2.9:unpack (unpack-mysql) @ myproject-distribut
ion ---
[INFO] Configured Artifact: com.jcabi:mysql-dist:windows-x86:5.5.34:zip
[INFO] mysql-dist-5.5.34-windows-x86.zip already unpacked.
[INFO]
[INFO] --- jcabi-mysql-maven-plugin:0.9:start (mysql-test) @ myproject-distributio
n ---
[INFO] jcabi-aspects 0.18/55a5c13 started new daemon thread jcabi-cacheable for
automated cleaning of expired @Cacheable values
Jan 23, 2015 2:39:34 PM org.hibernate.validator.internal.util.Version <clinit>
INFO: HV000001: Hibernate Validator 5.1.2.Final
[ERROR] JSR-303 validator failed to initialize: Unable to instantiate Configurat
ion. (see http://aspects.jcabi.com/jsr-303.html)
[INFO] jcabi-aspects 0.18/55a5c13 started new daemon thread jcabi-loggable for w
atching of @Loggable annotated methods
[INFO] reuse existing database false
[INFO] created C:\Users\IEUser\Project\packaging\distribution\target\mysql-data
directory
[INFO] $ perl C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist\s
cripts\mysql_install_db.pl --defaults-file=C:\Users\IEUser\Project\packaging\dis
tribution\target\mysql-data\my-default.cnf --force --innodb_use_native_aio=0 --d
atadir=C:\Users\IEUser\Project\packaging\distribution\target\mysql-data\data --b
asedir=C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist
[INFO] >> Installing MySQL system tables...OK
[INFO] >>
[INFO] >> Filling help tables...OK
[INFO] >>
[INFO] >> To start mysqld at boot time you have to copy
[INFO] >> support-files/mysql.server to the right place for your system
[INFO] >>
[INFO] >> PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
[INFO] >> To do so, start the server, then issue the following commands:
[INFO] >>
[INFO] >>   C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysqladmin -u root password 'new-password'
[INFO] >>   C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysqladmin -u root -h IE9Win7 password 'new-password'
[INFO] >>
[INFO] >> Alternatively you can run:
[INFO] >>
[INFO] >>   C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist/bin
/mysql_secure_installation
[INFO] >>
[INFO] >> which will also give you the option of removing the test
[INFO] >> databases and anonymous user created by default.  This is
[INFO] >> strongly recommended for production servers.
[INFO] >>
[INFO] >> See the manual for more instructions.
[INFO] >>
[INFO] >> You can start the MySQL daemon with:
[INFO] >>
[INFO] >>   cd . ; C:\Users\IEUser\Project\packaging\distribution\target\mysql-d
ist/bin/mysqld_safe &
[INFO] >>
[INFO] >> You can test the MySQL daemon with mysql-test-run.pl
[INFO] >>
[INFO] >>   cd mysql-test ; perl mysql-test-run.pl
[INFO] >>
[INFO] >> Please report any problems with the ./bin/mysqlbug script!
[INFO] >>
[INFO] >> The latest information about MySQL is available on the web at
[INFO] >>
[INFO] >>   http://www.mysql.com
[INFO] >>
[INFO] >> Support MySQL by buying support/licenses at http://shop.mysql.com
[INFO] >>
[INFO] $ C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist\bin\my
sqld.exe --no-defaults --user=IEUser --general_log --console --innodb_buffer_poo
l_size=64M --innodb_log_file_size=64M --log_warnings --innodb_use_native_aio=0 -
-binlog-ignore-db=root --basedir=C:\Users\IEUser\Project\packaging\distribution\
target\mysql-dist --lc-messages-dir=C:\Users\IEUser\Project\packaging\distributi
on\target\mysql-dist\share --datadir=C:\Users\IEUser\Project\packaging\distribut
ion\target\mysql-data\data --tmpdir=C:\Users\IEUser\Project\packaging\distributi
on\target\mysql-data\temp --socket=C:\Users\IEUser\Project\packaging\distributio
n\target\mysql-data\mysql.sock --pid-file=C:\Users\IEUser\Project\packaging\dist
ribution\target\mysql-data\mysql.pid --port=33061
[INFO] >> 150123 14:39:35 [Note] Plugin 'FEDERATED' is disabled.
[INFO] >> C:\Users\IEUser\Project\packaging\distribution\target\mysql-dist\bin\m
ysqld.exe: Table 'mysql.plugin' doesn't exist
[INFO] >> 150123 14:39:39 [ERROR] Can't open the mysql.plugin table. Please run
mysql_upgrade to create it.
[INFO] >> 150123 14:39:40 InnoDB: The InnoDB memory heap is disabled
[INFO] >> 150123 14:39:40 InnoDB: Mutexes and rw_locks use Windows interlocked f
unctions
[INFO] >> 150123 14:39:40 InnoDB: Compressed tables use zlib 1.2.3
[INFO] >> 150123 14:39:40 InnoDB: Initializing buffer pool, size = 64.0M
[INFO] >> 150123 14:39:40 InnoDB: Completed initialization of buffer pool
[INFO] >> InnoDB: The first specified data file .\ibdata1 did not exist:
[INFO] >> InnoDB: a new database to be created!
[INFO] >> 150123 14:39:40  InnoDB: Setting file .\ibdata1 size to 10 MB
[INFO] >> InnoDB: Database physically writes the file full: wait...
[INFO] >> 150123 14:39:41  InnoDB: Log file .\ib_logfile0 did not exist: new to
be created
[INFO] >> InnoDB: Setting log file .\ib_logfile0 size to 64 MB
[INFO] >> InnoDB: Database physically writes the file full: wait...
[INFO] >> 150123 14:40:01  InnoDB: Log file .\ib_logfile1 did not exist: new to
be created
[INFO] >> InnoDB: Setting log file .\ib_logfile1 size to 64 MB
[INFO] >> InnoDB: Database physically writes the file full: wait...
[INFO] >> InnoDB: Doublewrite buffer not found: creating new
[INFO] >> InnoDB: Doublewrite buffer created
[INFO] >> InnoDB: 127 rollback segment(s) active.
[INFO] >> InnoDB: Creating foreign key constraint system tables
[INFO] >> InnoDB: Foreign key constraint system tables created
[INFO] >> 150123 14:40:14  InnoDB: Waiting for the background threads to start
[INFO] >> 150123 14:40:18 InnoDB: 5.5.34 started; log sequence number 0
[INFO] >> 150123 14:40:18 [Note] Server hostname (bind-address): '0.0.0.0'; port
: 33061
[INFO] >> 150123 14:40:18 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
[INFO] >> 150123 14:40:18 [Note] Server socket created on IP: '0.0.0.0'.
[INFO] >> 150123 14:40:18 [ERROR] Fatal error: Can't open and lock privilege tab
les: Table 'mysql.host' doesn't exist
[ERROR] #start('Config(tcpport=33061, dbuser=root, dbpassword=roo..14..=[connect
-timeout=60, max_connections=150])', C:\Users\IEUser\Project\packaging\distribut
ion\target\mysql-dist, C:\Users\IEUser\Project\packaging\distribution\target\mys
ql-data, false, NULL): thrown java.io.IOException(socket C:\Users\IEUser\Project
\packaging\distribution\target\mysql-data\mysql.sock is not available after 5min
 of waiting) out of com.jcabi.mysql.maven.plugin.Instances#waitFor[322] in 5min
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:27 min
[INFO] Finished at: 2015-01-23T14:44:36-08:00

This was first reported by another of our developers and I have since reproduced the problem myself on a pretty vanilla Windows7 VM that I use for testing, on which I installed ActiveState Perl 5.20.

Interestingly there is no error reported by the perl script, but the warning about table mysql.plugin followed by the error regarding mysql.host suggests that the tables are not being installed properly.

I have configured the plugin to use the 5.5.34 distribution, since 5.6.14 and 5.6.21 are not able to run on Windows 7 due to separate issues.

After reading the comments on issue 39 I updated my configuration and verified that version 0.7 of the plugin does work OK on the same Windows 7 VM, so this would appear to be a problem with v0.9.

@yegor256
Copy link
Member

@wabson thanks for reporting, we'll investigate

@yegor256 yegor256 added the bug label Jan 26, 2015
@dmarkov
Copy link

dmarkov commented Jan 27, 2015

I'll ask someone to take care of this task soon

@dmarkov
Copy link

dmarkov commented Jun 19, 2015

@paucarre This task is yours, please go ahead keeping in mind this. If any questions, don't hesitate to ask right here; This task's budget is 30 mins. This is exactly how much will be paid when the problem explained above is solved. See this for more information

@ghost
Copy link

ghost commented Jun 20, 2015

I could not reproduce the error using Windows 8. The problem is that I get the error of the issue 39 instead (for both master and 0.9 tag): #39
MySQL is not able to find the configuration file (my-default.cnf)
On Windows 8.1 I get this output when trying to build the project using: mvn clean install -Pqulice

[info] $ perl c:\Users\Pau\workspace\jcabi-mysql-maven-plugin\target\mysql-dist\
scripts\mysql_install_db.pl --defaults-file=C:\Users\Pau\AppData\Local\Temp\1434
801012854-0\my-default.cnf --force --innodb_use_native_aio=0 --datadir=C:\Users\
Pau\AppData\Local\Temp\1434801012854-0\data --basedir=c:\Users\Pau\workspace\jca
bi-mysql-maven-plugin\target\mysql-dist
[info] >> FATAL ERROR: Could not find my-default.cnf
[info] >>
[info] >> If you compiled from source, you need to run 'make install' to
[info] >> copy the software into the correct location ready for operation.
[info] >>
[info] >> If you are using a binary release, you must either be at the top
[info] >> level of the extracted archive, or pass the --basedir option
[info] >> pointing to that location.
[info] >>
[info] $ c:\Users\Pau\workspace\jcabi-mysql-maven-plugin\target\mysql-dist\bin\m
ysqld.exe --no-defaults --user=Pau --general_log --console --innodb_buffer_pool_
size=64M --innodb_log_file_size=64M --log_warnings --innodb_use_native_aio=0 --b

Therefore I can not finalize this specific issue.

@dmarkov dmarkov removed the @paucarre label Jul 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants