Portál AbcLinuxu, 11. května 2025 10:30
jarda@jarda-laptop:~$ sudo mysql_install_db Neither host 'jarda-laptop' 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 jarda@jarda-laptop:~$ sudo mysql_install_db --force chown: neplatný uživatel: „mysql“ chown: neplatný uživatel: „mysql“ Installing MySQL system tables... 110320 20:50:32 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists! 110320 20:50:32 [ERROR] Aborting 110320 20:50:32 [Note] /usr/sbin/mysqld: Shutdown complete Installation of system tables failed! Examine the logs in /var/lib/mysql for more information. You can try to start the mysqld daemon with: shell> /usr/sbin/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/lib/mysql 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/scripts/mysqlbug script!pak ještě:
/usr/sbin/mysqld --skip-grant & [1] 3375 jarda@jarda-laptop:~$ 110323 11:52:46 [Warning] Can't create test file /var/lib/mysql/jarda-laptop.lower-test 110323 11:52:46 [Warning] Can't create test file /var/lib/mysql/jarda-laptop.lower-test /usr/sbin/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13) 110323 11:52:46 [ERROR] Aborting 110323 11:52:46 [Note] /usr/sbin/mysqld: Shutdown completepak v localhost/phpmyadmin se pokouším o login: #2002 Nepodařilo se přihlášení k MySQL serveru
Řešení dotazu:
/usr/bin/mysql -u root mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
jarda@jarda-laptop:~$ sudo mysql_install_db --force [sudo] password for jarda: Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h jarda-laptop password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /usr/mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/scripts/mysqlbug script! jarda@jarda-laptop:~$ /usr/sbin/mysqld --skip-grant & [1] 3860 jarda@jarda-laptop:~$ 110324 23:43:27 [Warning] One can only use the --user switch if running as root 110324 23:43:27 [Note] Plugin 'FEDERATED' is disabled. 110324 23:43:27 InnoDB: Started; log sequence number 0 44233 110324 23:43:27 [ERROR] Can't start server : Bind on unix socket: No such file or directory 110324 23:43:27 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ? 110324 23:43:27 [ERROR] Aborting 110324 23:43:27 InnoDB: Starting shutdown... 110324 23:43:33 InnoDB: Shutdown completed; log sequence number 0 44233 110324 23:43:33 [Note] /usr/sbin/mysqld: Shutdown completekam tohle: support-files/mysql.server mám umístit v Ubuntu? Napadlo mě jen Systém->Předvolby->Aplikace po spuštění
jarda@jarda-laptop:~$ /usr/bin/mysql -u root mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)Není nějaký kvalitní step by step tutoriál? Všechny co jsem našel (english) tak mají neduh, že se někde v návodu odchalují od mé reality (je to mou distribucí?) no a nemohu nikdy dokončit nastavení :)
sudo aptitude install mysql-serverA to je vše a MySQL je nainstalována a funkční
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.