• Register
0 votes

Problem :

I have very recently installed the MySQL community server 5.7.10 using binary zip. I have also extracted the zip in the c:\mysql and created my data folder in c:\mysql\data. I have also  created the config file as my.ini and placed it in the  c:\mysql in the root folder of the extracted zip. Following is the content of the my.ini file:

# set basedir to your installation path
# set datadir to the location of your data directory

I want to start MySQL using mysqld --console, but the process is often aborted with the following error message :

2019-12-14T18:04:01.141930Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2019-12-14T18:04:01.141930Z 0 [ERROR] Aborting 

Please let me know if you have any solution on above error message.

6 5 3
7,540 points

1 Answer

0 votes

Solution :

On the Maria DB please use mysql_install_db. In my case I tried to use the environment variable for my data path. Not only does the mysqld need to know where your data is and it is specified via commandline, but so does your install script.

Below is the way you can call the install script specifying your datapath:

mysql_install_db --user=root --datadir=$db_datapath


Hope it resolves your issue.

9 7 4
38,600 points

Related questions

0 votes
1 answer 1.8K views
Problem : Following is my issue: I tried to install mysqlclient like below : C:\Users\alecxe>pip install mysqlclient Collecting mysqlclient Using cached https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1 cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz Installed ... beginner to this and would be very happy if any input as to how to go about fixing above error.
asked Dec 27, 2019 alecxe 7.5k points
0 votes
2 answers 621 views
Problem : On installing Anaconda on Ubantu getting below Python error on miss-typed commands fatal python error: py_initialize: unable to get the locale encoding
asked Oct 21, 2019 peterlaw 6.9k points
0 votes
1 answer 7 views
Hi, I have a small php project. I need a php class that will enable me to retrieve the information from a database so that I can display in a table as shown in this html code: <!DOCTYPE html> <html> <head> <title>List of Cars</title> </head> <body> <table> <tr> <th>Year</th> <th>Brand</ ... >AUDI Q2 2020</td> </tr> <tr> <td>2020</td> <td>Volvo</td> <td>Xc60 2020</td> </tr> </table> </body> </html>
asked Oct 11 azriel 530 points
0 votes
1 answer 54 views
Problem : I am very new to the Linux but want to set up my MySQL databases on the Amazon ec2 instance. I have followed some directions I found about resetting a user login pass by using a --skip-grant-tables option of the MySQL. Now I want to add my user ... HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement How can I turn above option off?
asked Jan 30 jwilliam 3.9k points
0 votes
1 answer 11 views