OpenWrt install mysql-server - mysql

I am trying to install mysql-server on OpenWrt.
mysql_install_db --force gives me error:
/usr/bin/my_print_defaults: can't load library 'libnsl.so.0'
FATAL ERROR: Could not find /usr/lib/mysqld
If you compiled from source, you need to run 'make install' to copy
the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top level
of the extracted archive, or pass the --basedir option pointing to
that location.
I have install Libc but I can' find libnsl.so.0 under /usr/lib
I have my.cnf under /etc/
Content of my.cnf:
root#OpenWrt:/etc# cat my.cnf
[client]
port = 3306
socket = /var/run/mysqld.sock
[mysqld]
user = root
socket = /var/run/mysqld.sock
port = 3306
basedir = /usr
############ Don't put this on the NAND #############
# Figure out where you are going to put the databases
# And run mysql_install_db --force
datadir = /mnt/data/mysql/
######### This should also not go on the NAND #######
tmpdir = /mnt/data/tmp/
skip-external-locking
bind-address = 127.0.0.1
# Fine Tuning
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
#expire_logs_days = 10
#max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
I also created mkdir /usr/lib/mysqld folder.
drwxr-xr-x 2 root root 4096 Mar 19 17:39 mysqld
Then I get error:
/usr/bin/my_print_defaults: can't load library 'libnsl.so.0'
Installing MySQL system tables...
/usr/bin/mysql_install_db: line 418: /usr/lib/mysqld: Permission denied
Installation of system tables failed! Examine the logs in
/var for more information.
You can try to start the mysqld daemon with:
shell> /usr/lib/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!
I also tried:
cd /usr/lib
wget http://trac.augsburg.freifunk.net/export/3/trunk/freifunk-openwrt-kit-1.6.20-de/root/lib/libnsl.so.0 libnsl.so.0
Then I get error:
'/usr/lib/libnsl.so.0' is not an ELF file
I do not know what to do any more.
Please give me some idea! Thanks!
UPDATE:
I have updated opkg.conf
Removed mysql-server
And istall mysql-server from new url provided in opkg.conf
mysql_install_db works now great.
I can start mysqld without error BUT
I CANT CHANGE ROOT PASSWORD
/usr/bin/mysqladmin -u root password 'xxxxxxxxx'
/usr/bin/mysqladmin: can't load library 'libnsl.so.0'
any other option to change mysql root password?
UPDATE2:
Install: http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/libmysqlclient_5.1.53-7_ar71xx.ipk
WORKS!!!!

Related

Can't set mysql database in SSH

I am using a VPS Ubuntu 20.04 in a2 hosting. I am trying to set up my mysql database but I am getting some error. I am doing this through a SSH. I installed mysql using
sudo apt-get install mysql-server mysql-client
and it installed just fine. But when I try to run
sudo mysql_secure_installation
it throws me this error
Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
I have tried to reinstall mysql-server, but without success. I have noticed some errors:
In my /etc/mysql/my.cnf file, it looks like is missing some code, I just have this:
It doesn't have any information about the socket.
My /var/run/mysqld/mysqld.sock file was not created when I installed the db. Not even the folder /var/run/mysqld was created. I tried to create both, but it still doesn't worked. In my example, the files are being created in a wrong way ou not even being created. I don't know why this is happening.
FIle: /etc/mysql/mysql.conf.d/mysqld.cnf
#
# The MySQL database server configuration file.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
[mysqld]
#
# * Basic Settings
#
user = mysql
# pid-file = /var/run/mysqld/mysqld.pid
# socket = /var/run/mysqld/mysqld.sock
# port = 3306
# datadir = /var/lib/mysql
# If MySQL is running as a replication slave, this should be
# changed. Ref https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_tmpdir
# tmpdir = /tmp
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
mysqlx-bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer_size = 16M
# max_allowed_packet = 64M
# thread_stack = 256K
# thread_cache_size = -1
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover-options = BACKUP
# max_connections = 151
# table_open_cache = 4000
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
#
# Log all queries
# Be aware that this log type is a performance killer.
# general_log_file = /var/log/mysql/query.log
# general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
# slow_query_log = 1
# slow_query_log_file = /var/log/mysql/mysql-slow.log
# long_query_time = 2
# log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
# server-id = 1
# log_bin = /var/log/mysql/mysql-bin.log
# binlog_expire_logs_seconds = 2592000
max_binlog_size = 100M
# binlog_do_db = include_database_name
# binlog_ignore_db = include_database_name
Is there anything I am missing? If someone could help me I would be grateful. Thank you!
For anyone who have the same error, I solve this by reinstalling my entire OS. My ubuntu version was 20.04 and I installed the 18.04 version. This solved for me.

Huge latency to connect webapp to docker mysql container via Hibernate

I'm trying to port my web-app created on Windows, using Hibernate, XAMPP for Apache tomcat and mysql server, to Linux, using Docker.
After i've done the following steps, The first feature of my web.app is login/register form: On Windows all works perfectly, but with container there is latency about tens of minutes.. and sometime there is also 500 http error!!
docker run -d --name mysql-phpmyadmin -p 127.0.0.1:8686:80 -p 127.0.0.1:3306:3306 grzesiekb/mysql-phpmyadmin
docker run -d -p 8484:8080 -p 8007:8009 --name tomcat8-linked --link mysql-phpmyadmin:mysqlphp tomcat:8.0-jre8 and then deploy under webapps/ folder my warfile
In my hibernate.cfg.xml, you can see it here (i have problems to paste it in a viewable way) :)
in my mysql container my.cnf there is:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
general_log_file = /var/log/mysql/mysql.log
general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#slow_query_log_file = /var/log/mysql/mysql-slow.log
#slow_query_log = 1
#long_query_time = 2
#log_queries_not_using_indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
By default, this mysql container only allows connection from localhost: for allowing connections from everywhere, i've done:
GRANT ALL PRIVILEGES ON . TO 'root'#'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Then i've imported my dql dump via phpmyadmin
Describe the results you received:
Huge latency, related to i don't know which problem, and in a random way there is no way to connect to mysql. No logs. My teacher said that probably it's a DNS problem related to Docker network.
Describe the results you expected:
Connection to the db immediately, like in Windows using XAMPP
You should try to make your setup as standard as possible to avoid bugs due to non-standard practices.
Use official or at least popular images (with millions of pulls) instead of your mysql-phpmyadmin with a hundred pulls :
https://hub.docker.com/search/?isAutomated=0&isOfficial=1&page=1&pullCount=0&q=mysql
https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=phpmyadmin
I'm not sure why you declare ip with host port and container port, maybe don't do this if it's not necessary, publish only host port and container port, not ip.
Don't use --link since it's deprecated, create a bridge network and run each container with --network my-bridge-network.
Upgrade your Ubuntu to the latest LTS version (16.04.2) with the latest available "HWE" kernel for this LTS version (you have to upgrade kernel with a seperate command as explained here : sudo apt-get install --install-recommends xserver-xorg-hwe-16.04

MariaDB is not checking password on Ubuntu 15.04

I installed Ubuntu Server 15.04 and MariaDB 10.0.17 on my server.
When install MariaDB, I can't see password setting page, and install is complete.
So I try to change my root password using SET PASSWORD and UPDATE table.
But, not happened.
I can access MySQL using any password and no password.
Like this:
root#kuroneko-Server:~# mysql -uroot -p
Enter password: [Type 'itsnotpassword']
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 34
Server version: 10.0.17-MariaDB-0ubuntu1 (Ubuntu)
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
I already tring flush privileges; and service mysql restart.
Reinstall ubuntu, reinstall mariadb... etc.
service mysql status:
root#kuroneko-Server:~# service mysql status
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql)
Active: active (running) since 금 2015-05-22 11:17:41 EDT; 34min ago
Docs: man:systemd-sysv-generator(8)
Process: 8127 ExecStop=/etc/init.d/mysql stop (code=exited, status=0/SUCCESS)
Process: 8158 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/mysql.service
├─8183 /bin/bash /usr/bin/mysqld_safe
├─8184 logger -p daemon.err -t /etc/init.d/mysql -i
└─8338 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
5월 22 11:17:40 kuroneko-Server systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
5월 22 11:17:40 kuroneko-Server mysql[8158]: * Starting MariaDB database server mysqld
5월 22 11:17:41 kuroneko-Server mysql[8158]: ...done.
5월 22 11:17:41 kuroneko-Server systemd[1]: Started LSB: Start and stop the mysql database server daemon.
MariaDB setting.
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
#
# * Character sets
#
# Default is Latin1, if you need UTF-8 set all this (also in client section)
#
character-set-server = utf8
collation-server = utf8_general_ci
character_set_server = utf8
collation_server = utf8_general_ci
#
# * Unix socket authentication plugin
#
# Needed so the root database user can authenticate without a password but
# only when running as the unix root user.
#
# Also available for other users if required.
# See https://mariadb.com/kb/en/unix_socket-authentication-plugin/
plugin-load-add = auth_socket.so
Does anyone know about this?
I can't find any information about this problem.
See: http://ubuntuforums.org/showthread.php?t=2275033
And execute the below sql:
USE mysql;
UPDATE user
SET password=PASSWORD('NEW_PASSWORD'),
plugin=''
WHERE user='root';
FLUSH PRIVILEGES;
PS: Because of safe consideration, the plugin field on root users was set, in order to prevent non-root user login. So cancelling that plugin will work.
The answer is right there in your config file
#
# * Unix socket authentication plugin
#
# Needed so the root database user can authenticate without a password but
# only when running as the unix root user.
#
# Also available for other users if required.
# See https://mariadb.com/kb/en/unix_socket-authentication-plugin/
plugin-load-add = auth_socket.so
The auth_socket.so allows when you are the root, to login without password prompt. So you can ideally login with just typing "mysql"
MariaDB 10.0.17 cannot access root with non-root user.
(Includ web access)
And anyone can access MariaDB root with ubuntu root user.
(Not Certification)
So make new root2 user to managed mysql on web.
Unix socket authentication plugin is built-in since 10.0.22-6
Needed so the root database user can authenticate without a password but only when running as the unix root user.
Also available for other users if required.
See https://mariadb.com/kb/en/unix_socket-authentication-plugin/

multiple instances mysql on ubuntu error

I have been trying to make multiple instances of mysql on ubuntu. These are the steps I followed.
mv /etc/init.d/mysql /etc/init.d/mysql_mono.server
cp /usr/share/mysql/mysqld_multi.server /etc/init.d/mysql
With your favourite text editor, edit /etc/init.d/mysql, then find the lines:
basedir=/usr/local/mysql
bindir=/usr/local/mysql/bin
And change to:
basedir=/usr
bindir=/usr/bin
If your have a root password in localhost, edit the file /usr/bin/mysqld_multi, then find the line:
$opt_password = undef()
And change to:
$opt_password = "password"
changing "password" by the 'root'#'localhost' password.
Now create a database directory for each additional mysqld instance:
# cp -pr /var/lib/mysql /var/lib/mysql1
# cp -pr /var/lib/mysql /var/lib/mysql2
My configuration file(my.cnf) is:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld1]
user = root
pid-file = /var/run/mysqld1.pid
socket = /var/run/mysqld1.sock
port = 3301
datadir = /var/lib/mysql1
log = /var/log/mysql/mysql1.log
server-id = 1
log_bin = /var/log/mysql/mysql1-bin.log
[mysqld2]
user = root
pid-file = /var/run/mysqld2.pid
socket = /var/run/mysqld2.sock
port = 3302
datadir = /var/lib/mysql2
log = /var/log/mysql/mysql2.log
server-id = 2
log_bin = /var/log/mysql/mysql2-bin.log
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1
log_error = /var/log/mysql/error.log
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
``!includedir /etc/mysql/conf.d/
Still I get this error when i run following command:
mysql --socket=/var/run/mysqld1.sock -uroot
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld1.sock' (2)
via http://dev.mysql.com/doc/refman/5.5/en/multiple-unix-servers.html
One way is to run multiple MySQL instances on Unix is to compile
different servers with different default TCP/IP ports and Unix socket
files so that each one listens on different network interfaces.
Compiling in different base directories for each installation also
results automatically in a separate, compiled-in data directory, log
file, and PID file location for each server.
Assume that an existing 5.1 server is configured for the default
TCP/IP port number (3306) and Unix socket file (/tmp/mysql.sock). To
configure a new 5.5.35 server to have different operating parameters,
use a CMake command something like this:
shell> cmake . -DMYSQL_TCP_PORT=port_number \
-DMYSQL_UNIX_ADDR=file_name \
-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-5.5.35

MySQL my.cnf file - Found option without preceding group

I'm trying to connect to my DB in Ubuntu remotely but I receive error message when trying to mysql -u root -p:
Found option without preceding group in config file: /etc/mysql/my.cnf at line: 1
my.cnf looks like:
[mysqld]
user = mysql
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
bind-address = 0.0.0.0
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
log_error = /var/log/mysql/error.log
expire_logs_days = 10
max_binlog_size = 100M
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
[isamchk]
key_buffer = 16M
Missing config header
Just add [mysqld] as first line in the /etc/mysql/my.cnf file.
Example
[mysqld]
default-time-zone = "+08:00"
Afterwards, remember to restart your MySQL Service.
sudo mysqld stop
sudo mysqld start
Charset encoding
Check the charset encoding of the file. Make sure that it is in ASCII.
Use the od command to see if there is a UTF-8 BOM at the beginning, for example.
What worked for me:
Open my.ini with Notepad++
Encoding --> convert to ANSI
save
it is because of letters or digit infront of [mysqld] just check the leeters or digit anything is not required before [mysqld]
it may be something like
0[mysqld] then this error will occur
I had this problem when I installed MySQL 8.0.15 with the community installer. The my.ini file that came with the installer did not work correctly after it had been edited. I did a full manual install by downloading that zip folder. I was able to create my own my.ini file containing only the parameters that I was concerned about and it worked.
download zip file from MySQL website
unpack the folder into C:\program files\MySQL\MySQL8.0
within the MySQL8.0 folder that you unpacked the zip folder into, create a text file and save it as my.ini
include the parameters in that my.ini file that you are concerned about. so something like this(just ensure that there is already a folder created for the datadir or else initialization won't work):
[mysqld]
basedire=C:\program files\MySQL\MySQL8.0
datadir=D:\MySQL\Data
....continue with whatever parameters you want to include
initialize the data directory by running these two commands in the command prompt:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --default-file=C:\program files\MySQL\MySQL8.0\my.ini --initialize
install the MySQL server as a service by running these two commands:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --install --default-file=C:\program files\MySQL\MySQL8.0\my.ini
finally, start the server for the first time by running these two commands:
cd C:\program files\MySQL\MySQL8.0\bin
mysqld --console