• Register
0 votes
718 views

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
basedir=C:\mysql
# set datadir to the location of your data directory
datadir=C:\mysql\data

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

Please log in or register to answer this question.

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

1 vote
1 answer 6 views
6 views
Problem: Facing serious issue during MySQL installation. Fatal error: can't open and lock privilege tables: table 'mysql.host' doesn't exist.
asked Mar 26 PkGuy 13.1k points
0 votes
1 answer 1 view
1 view
Problem: Any help on this will be appreciated. "Can't open and lock privilege tables: table 'mysql.user' doesn't exist."
asked 4 days ago muktaa 5.4k points
0 votes
1 answer 113 views
113 views
Problem : xampp-mysql - “table doesn't exist in engine”
asked Feb 28 Shovo210 14k points
0 votes
1 answer 245 views
245 views
Problem: When i try to setup my databse using xampp phpmyadmin i am getting an 1932 error table 'phpmyadmin.pma__tracking' doesn't exist in engine. I need assistance how can we overcome this error.
asked Nov 13, 2020 prog_learner 2.5k points
0 votes
1 answer 15 views
15 views
Problem; HELP! I need help understanding this error and why it still happened to me : Fatal error c1083: cannot open include file: 'mysql.h': no such file or directory.
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 3K views
3K 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 974 views
974 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 3 views
3 views
Problem: Hello please help me to find the solution .. I can't find any matching row in the user table
asked Mar 25 Ifra 24.4k points
0 votes
1 answer 6 views
6 views
Problem: I am working on a program and faced this error. A fatal mysql error was encountered.
asked Mar 24 PkGuy 13.1k points
0 votes
1 answer 6 views
6 views
Problem: How to fix: “UnicodeDecodeError: 'ascii' codec can't decode byte”
asked Mar 16 ummesalma 25.2k points