I'm new to mysql, sorry if there are inaccuracies. The main thing that I need is to get the tables from the database. If the complete reinstallation of mysql database does not disappear despite the fact that I did not do any export, I will reinstall mysql. Or maybe you know how to solve the problem of falling, to get a DB without reinstalling Or maybe you can restore something else?

@asus ➜ ~ rvm:(system) sudo service mysql start @asus ➜ ~ rvm:(system) sudo service mysql status ● mysql.service - LSB: Start/ Stop MySQL Community Server daemon Loaded: loaded (/etc/init.d/mysql; bad; vendor preset: enabled) Active: active (exited) since Sun 2016-08-21 00:39:23 EEST; 59min ago Docs: man:systemd-sysv-generator(8) Process: 3789 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCESS) Aug 21 00:39:23 asus mysql[3789]: ....................................................................................................................................... Aug 21 00:39:23 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. Aug 21 01:08:47 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. Aug 21 01:34:58 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. Aug 21 01:35:15 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. Aug 21 01:35:40 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. Aug 21 01:36:46 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. Aug 21 01:37:33 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. Aug 21 01:37:34 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. Aug 21 01:38:41 asus systemd[1]: Started LSB: Start/ Stop MySQL Community Server daemon. @asus ➜ ~ rvm:(system) sudo mysql -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) @asus ➜ ~ rvm:(system) sudo mysql --host localhost --port 3306 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) @asus ➜ ~ rvm:(system) 
  • one
    very strange question. can you reformulate it? when you reinstall the base will not disappear You can copy the database files (in ubunt this is /var/lib/mysql/ ) data somewhere, just in case. If sudo ps ax | grep mysql sudo ps ax | grep mysql will show that the server is running, so you just forgot your password, google how to restore it - strangeqargo
  • @strangeqargo, thanks helped - Andrew Shostyk
  • then add the answer. - strangeqargo
  • Possible duplicate question: How to restore a database from * .MYD * MYI * FRM? - AK

1 answer 1

when you reinstall the base will not disappear.

You can copy the database files (in ubunt this is / var / lib / mysql /) data somewhere, just in case.

If sudo ps ax | grep mysql will show that the server is running, so you just forgot the password, google how to restore it

  • In centos too / var / lib / mysql - I suspect that in other nix-systems there will be something similar. - AK
  • It is necessary to clarify the part of myisam or innodb tables - there are nuances, if not default setting. But once the topstarter is satisfied ... - AK