Thread: mysql database missing
dear all
installed mysql server 5.5 under ubuntu 12.10 through repository. when trying change password, got following message:
i googled online; seems reason not change password because "mysql" database lost. checked installed database , got following information:code:ll@wenwen:~$ mysqladmin -u root password "newpassword"; mysqladmin: connect server @ 'localhost' failed error: 'access denied user 'root'@'localhost' (using password: no)' ll@wenwen:~$
so "mysql" database missing? how can recover it?code:mysql> show databases; +--------------------+ | database | +--------------------+ | information_schema | | test | +--------------------+ 2 rows in set (0.00 sec) mysql>
before ran `show databases;` command must have connected mysql. if did using command
then connected mysql "null" user (no username , no password). in case 'mysql' database not show because null user not have permission see it.code:mysql
when installing 'mysql-server' repositories prompted set mysql root password. if repeatedly decline (and ask 3 (3) times) mysql root user have no password. not recommended security reasons. however, if can connect mysql root via
if command gives same error received before ('access denied user 'root'@'localhost' (using password: no)') mysql server does have root password. if don't know password can reset mysql root password using instructions here (from mysql reference manual).code:mysql --user=root
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] mysql database missing
Ubuntu
Comments
Post a Comment