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/"
Related
After installing Docker and Laradock on my Mac I'm trying to start the docker containers using the command:
docker-compose up -d nginx mysql phpmyadmin
I get the output:
Starting laradock_mysql_1 ... done
Starting laradock_docker-in-docker_1 ... done
Starting laradock_phpmyadmin_1 ... done
Starting laradock_workspace_1 ... done
Starting laradock_php-fpm_1 ... done
Starting laradock_nginx_1 ... done
Seems fine, but for some reason MySQL is crashing. When I try to start the container again I get the following message:
mysql_1 | 2020-10-01T10:19:52.124915Z 1 [Warning] [MY-012579] [InnoDB] fallocate(25, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 16384) returned errno: 22
mysql_1 | 2020-10-01T10:19:52.143672Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysql_1 | 2020-10-01T10:19:52.159801Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
mysql_1 | 2020-10-01T10:19:52.160778Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql_1 | 2020-10-01T10:19:52.161607Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql_1 | 2020-10-01T10:19:52.795909Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.21) MySQL Community Server - GPL.
I tried adding "command: --lower_case_table_names=0" to my docker-compose file, but that does not seem to help.
MySQL crashes with:
mysql_1 | 2020-10-01 10:21:28+00:00 [ERROR] [Entrypoint]: mysqld failed while attempting to check config
mysql_1 | command was: mysqld --lower_case_table_names=0 --verbose --help
mysql_1 | 2020-10-01T10:21:28.547104Z 0 [ERROR] [MY-010158] [Server] The server option 'lower_case_table_names' is configured to use case sensitive table names but the data directory is on a case-insensitive file system which is an unsupported combination. Please consider either using a case sensitive file system for your data directory or switching to a case-insensitive table name mode.
mysql_1 | 2020-10-01T10:21:28.549273Z 0 [ERROR] [MY-010119] [Server] Aborting
My solution:
cmd
fsutil file setCaseSensitiveInfo "C:\Users\XXXXX\.laradock\data\mysql"
This will change lower_case_table_names for data dictionary from ('0') to ('2') in Windows 10.
XXXXX - your username in Windows 10.
then:
docker-compose up mysql
This was most likely caused by the docker update to 2.4. See:
Mysql not starting in a docker container on MacOS after docker update
The solution madx provided works. And if got an error message says that the target folder is not empty and therefore cannot make the folder case-sensitive, just 1.move the files and subfolders out of the target folder; 2.make the target folder case-sensitive; 3.move the files and subfolders back to the target folder. Everything would be OK.
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.
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
When i'm composing up from my laradock folder. All services start except from mysql. Screenshot here
I have restored my docker to default settings but mysql keeps exiting. My error say's i'm setting a value. But i don't even have a database. So that confuses me.
ERROR: mysqld failed while attempting to check config
mysql_1 | command was: "mysqld --verbose --help"
mysql_1 |
mysql_1 | 2018-05-07T16:24:32.727143Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
mysql_1 | 2018-05-07T16:24:32.727230Z 0 [ERROR] [MY-011071] [Server] /usr/sbin/mysqld: Error while setting value 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'
mysql_1 | 2018-05-07T16:24:32.729063Z 0 [ERROR] [MY-010119] [Server] Aborting
edited laradock/.env,set MYSQL_VERSION from latest to 5.7
deleted ~/.laradock/mysql/ directory completely (Warning, This may delete your data ! )
then rebuild docker-compose build mysql
docker-compose up -d mysql as usual
Hope this helps :)
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