I am all new to Iava and JDBC. Probably making a simple mistake. I am trying to start MySQL from NetBeans with the following server properties:
I get the following error messages:
mysqld: Can't change dir to '/usr/local/mysql-8.0.0-dmr-osx10.11-x86_64/data/' (Errcode: 13 - Permission denied)
2020-08-13T10:45:33.948213Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-08-13T10:45:33.948830Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2020-08-13T10:45:33.948973Z 0 [Note] /usr/local/mysql-8.0.0-dmr-osx10.11-x86_64/bin/mysqld (mysqld 8.0.0-dmr) starting as process 29862 ...
2020-08-13T10:45:33.963298Z 0 [Warning] Can't create test file /usr/local/mysql-8.0.0-dmr-osx10.11-x86_64/data/Mauritss-MacBook-Air.lower-test
2020-08-13T10:45:33.963374Z 0 [Warning] Can't create test file /usr/local/mysql-8.0.0-dmr-osx10.11-x86_64/data/Mauritss-MacBook-Air.lower-test
2020-08-13T10:45:33.963913Z 0 [ERROR] failed to set datadir to /usr/local/mysql-8.0.0-dmr-osx10.11-x86_64/data/
2020-08-13T10:45:33.963935Z 0 [ERROR] Aborting
2020-08-13T10:45:33.964020Z 0 [Note] Binlog end
2020-08-13T10:45:33.964169Z 0 [Note] /usr/local/mysql-8.0.0-dmr-osx10.11-x86_64/bin/mysqld: Shutdown complete
I realise I probably have to add some connector but I don't know where and how.
Related
I am using mysqld to create an new server along with the existing one[ MYSQL 8.0.27 installed with the windows installer] to test data replication
I already have an instance of the server installed [called Mysql80] which is the original server and i am trying to create another server called MyTest using mysqld by reading this documentation which seems simple enough
i have created an empty Data directory to hold my new database and my configuration file for the server is saved as conf.cnf
[MyTest]
port = 3310
datadir = E:/Program Files/Developer/MYSQL/Data/TestFolder/Data
from the windows command line i create the server using their exact instructions
mysqld --defaults-file=E:/conf.cnf --console
--console is used to display debugging information but i always get these error's
021-12-12T17:17:11.844725Z 0 [System] [MY-010116] [Server] E:\Program Files\Developer\MYSQL\Server 8.0\bin\mysqld.exe (mysqld 8.0.27) starting as process 2328
2021-12-12T17:17:11.875406Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-12-12T17:17:13.498780Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2021-12-12T17:17:13.866706Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2021-12-12T17:17:13.867207Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-12-12T17:17:13.867617Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-12-12T17:17:13.868042Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-12-12T17:17:13.868519Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-12-12T17:17:13.868926Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-12-12T17:17:13.869354Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-12-12T17:17:13.869707Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2021-12-12T17:17:13.979431Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2021-12-12T17:17:14.140027Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2021-12-12T17:17:14.172455Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
2021-12-12T17:17:14.172592Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
2021-12-12T17:17:14.175122Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-12-12T17:17:14.175319Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-12-12T17:17:14.176633Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Only one usage of each socket address (protocol/netwo k address/port) is normally permitted.
2021-12-12T17:17:14.176755Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 3306 ?
2021-12-12T17:17:14.177195Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-12-12T17:17:15.446688Z 0 [System] [MY-010910] [Server] E:\Program Files\Developer\MYSQL\Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.27) MySQL Community Server - GPL.
Ignoring the optimizer error's and cannot find table error's the server always tries to start on port 3306 even though i have specified in my conf file it should be on port 3310
Which makes me believe that i typed the config file in the wrong format or i haven't specified enough parameters for the job
any ideas?
Turns out i was doing two things wrong
I had previously upgraded from mysql 8 to 8.27 hence tables were corrupted which explained the Optimization errors
My config wasn't in the correct format
After deleting the MySQL service from windows services and deleting my data directory these 3 steps need to be performed in order
Create an new directory to store Data, your config file , upload directory[To Use commands like LOAD FILE]
The structure looks like this
->Warehouse1
|--->Data
|--->Uploads
|--->MyConfig.cnf
Where MyConfig.cnf looks as follows
[mysqld]
basedir="E:\Program Files\Developer\MYSQL\Server 8.0"
port=3306
datadir="E:\Program Files\Developer\MYSQL\Storage\WareHouse1\Data"
secure-file-priv="E:\Program Files\Developer\MYSQL\Storage\WareHouse1\Uploads"
2)Initialize the data directory from your windows command line using mysqld as follows
mysqld --defaults-file="E:\Program Files\Developer\MYSQL\Storage\WareHouse1\config.cnf" --initialize
3)Finally create an service which you can change in Windows Services window
mysqld --install MySQL81 --defaults-file="E:\Program Files\Developer\MYSQL\Storage\WareHouse1\config.cnf"
Repeat the same steps to create an second server.
I tried to start MYSQL in safe mode to reset the root password, but getting the below error.
I had mysql server installed on my mac, yesterday i encountered some error where it was repeatedly shutting down automatically. However i wasn't able to connect to server using command line as it was erroring out mentioning the root password was wrong. Though I was able to connect using mysql workbench.
I reinstalled SQL Server and still not able to login using the new root password.
sudo mysqld --skip-grant-tables
2019-10-23T10:13:40.361911Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-10-23T10:13:40.362146Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2019-10-23T10:13:40.362217Z 0 [Note] mysqld (mysqld 5.7.28) starting as process 4763 ...
2019-10-23T10:13:40.365571Z 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql-5.7.28-macos10.14-x86_64/data/ is case insensitive
2019-10-23T10:13:40.365648Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2019-10-23T10:13:40.365676Z 0 [ERROR] Aborting
2019-10-23T10:13:40.365690Z 0 [Note] Binlog end
2019-10-23T10:13:40.365844Z 0 [Note] mysqld: Shutdown complete
This one is stumping me bigtime...
JohnnyRingo#Johns-MacBook-Pro:~$ mysqld
mysqld: Can't change dir to '/usr/local/mysql-5.7.19-macos10.12-x86_64/data/' (Errcode: 13 - Permission denied)
2017-09-16T03:18:04.160020Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-09-16T03:18:04.160358Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-09-16T03:18:04.160429Z 0 [Note] mysqld (mysqld 5.7.19) starting as process 2451 ...
2017-09-16T03:18:04.164591Z 0 [Warning] Can't create test file /usr/local/mysql-5.7.19-macos10.12-x86_64/data/Johns-MacBook-Pro.lower-test
2017-09-16T03:18:04.164629Z 0 [Warning] Can't create test file /usr/local/mysql-5.7.19-macos10.12-x86_64/data/Johns-MacBook-Pro.lower-test
2017-09-16T03:18:04.164704Z 0 [ERROR] failed to set datadir to /usr/local/mysql-5.7.19-macos10.12-x86_64/data/
2017-09-16T03:18:04.164720Z 0 [ERROR] Aborting
2017-09-16T03:18:04.164729Z 0 [Note] Binlog end
2017-09-16T03:18:04.164811Z 0 [Note] mysqld: Shutdown complete
I am using a hosting server that doesn't provide me with a root account.
They don't provide me with an installation service of database.
The server is Red Hat Enterprise Linux Server release 6.1 (Santiago) x86_64.
I tried to download and install MySQL 5.7.10, but it shows me errors regarding to InnoDB setup as below:
[hoge#blackett mysql]$ ./bin/mysqld --initialize --basedir=/home/hoge/mysql --character-set-server=utf8
2016-01-27T14:20:51.751550Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2016-01-27T14:20:51.751921Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-01-27T14:20:52.148092Z 0 [Warning] InnoDB: io_setup() failed with EAGAIN. Will make 5 attempts before giving up.
2016-01-27T14:20:52.148146Z 0 [Warning] InnoDB: io_setup() attempt 1.
2016-01-27T14:20:52.658080Z 0 [Warning] InnoDB: io_setup() attempt 2.
2016-01-27T14:20:53.168026Z 0 [Warning] InnoDB: io_setup() attempt 3.
2016-01-27T14:20:53.676057Z 0 [Warning] InnoDB: io_setup() attempt 4.
2016-01-27T14:20:54.181090Z 0 [Warning] InnoDB: io_setup() attempt 5.
2016-01-27T14:20:54.687086Z 0 [ERROR] InnoDB: io_setup() failed with EAGAIN after 5 attempts.
2016-01-27T14:20:54.687174Z 0 [ERROR] InnoDB: Cannot initialize AIO sub-system
2016-01-27T14:20:54.687194Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2016-01-27T14:20:54.687208Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-01-27T14:20:54.687215Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-01-27T14:20:54.687223Z 0 [ERROR] Failed to initialize plugins.
2016-01-27T14:20:54.687229Z 0 [ERROR] Aborting
I also did the following:
cp ./support-files/my-default.cnf ~/my.cnf
I tried the following command, but it gives me the same errors:
[hoge#blackett mysql]$ ./bin/mysqld --initialize --character-set-server=utf8 --basedir=/home/hoge/mysql --defaults-file=/home/hoge/my.cnf
I wrote the following in my.cnf, but doesn't solve the error:
innodb_use_native_aio = 0
I have no ideas to solve them.
Could you please help me?
Maybe...
On Linux systems, running multiple MySQL servers (typically more than
12) with default settings for innodb_read_io_threads,
innodb_write_io_threads, and the Linux aio-max-nr setting can exceed
system limits. Ideally, increase the aio-max-nr setting; as a
workaround, you might reduce the settings for one or both of the
MySQL configuration options.
-- http://bugs.mysql.com/bug.php?id=61575
I resolved the issue myself.
The document https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html says
the --defaults-file option must be first
When I typed ./bin/mysqld --defaults-file=/home/hoge/my.cnf --initialize --character-set-server=utf8 --basedir=/home/hoge/mysql, the option file was recognized.
Another solution is to specify --innodb_use_native_aio=0 option directly without using the option file, my.cnf, as below:
./bin/mysqld --initialize --basedir=/home/utpsy/mysql --character-set-server=utf8 --innodb_use_native_aio=0
I am working on a *nix machine and I don't have root privileges.
I am trying to install mysql locally using this blogpost: http://www.thedance.net/~roth/TECHBLOG/localMySQL.html
However, I am stuck at scripts/mysql_install_db command.
When I run this command I get the following error:
FATAL ERROR: Neither host 'server.address.com' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script
with the --force option
On further digging, I found that adding --basedirresolves this issue. But then it generates the following errors:
$scripts/mysql_install_db --basedir=.
Installing MySQL system tables...2015-07-17 01:38:15 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2015-07-17 01:38:15 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-07-17 01:38:15 0 [Note] ./bin/mysqld (mysqld 5.6.25) starting as process 10281 ...
2015-07-17 01:38:15 10281 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
2015-07-17 01:38:15 10281 [Warning] Can't create test file /var/lib/mysql/head.lower-test
2015-07-17 01:38:15 10281 [Warning] Can't create test file /var/lib/mysql/head.lower-test
./bin/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13 - Permission denied)
2015-07-17 01:38:15 10281 [ERROR] Aborting
2015-07-17 01:38:15 10281 [Note] Binlog end
2015-07-17 01:38:15 10281 [Note]
When I add --datadir=myDataDir (where myDataDir is a local directory) it generates following error:
$scripts/mysql_install_db --basedir=. --datadir=myDataDir
Installing MySQL system tables...2015-07-17 01:40:54 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2015-07-17 01:40:54 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-07-17 01:40:54 0 [Note] ./bin/mysqld (mysqld 5.6.25) starting as process 10329 ...
2015-07-17 01:40:54 10329 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
It is trying to access system level folders and because of the permission issues it is failing. How do I install it locally. And how do I setup the hostname?
The problem lies on the following line in log:
[ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
To solve it, add this flag to your command:
--lc-messages-dir="/some/path/you/can/access/without/sudo/"