I get the error "Table 'mysql.servers' doesn't exist" from plesk when I try to create a new database user, the created user does not show up anywhere but the name is still reserved, and it does not allow me to access the database.
我得到了"Table " mysql。当我尝试创建一个新的数据库用户时,从plesk中“不存在”服务器,创建的用户不会出现在任何地方,但是它的名称仍然保留,而且它不允许我访问数据库。
edit: I was unable to login to phpMyAdmin to this webserver, so instead I managed to login to it through a different domain, and it tells me a notice: Your PHP MySQL library version 5.0.90 differs from your MySQL server version 5.1.49. This may cause unpredictable behavior.
编辑:我无法登录phpMyAdmin到这个webserver,所以我设法通过一个不同的域登录到它,它告诉我一个通知:你的PHP MySQL库版本5.0.90不同于你的MySQL服务器版本5.1.49。这可能会导致不可预知的行为。
edit: manually installed phpmyadmin then manually installed libmcrypt (which is an accomplishment with my cruddy sever skills :D) so that phpmyadmin works. Then accidentally found out how to login as root via plesk (the trick is to enter webadmin without choosing any database), at least I think it's root :S ran the sql: GRANT SELECT ON mysql.* TO 'my-user'@'localhost'; with a success message went back to plesk to see if I can manage the sql with "my-user" and no, its still missing from the available users, but the name is still reserved... tried to run: mysql_fix_privilege_tables –user=root –password=mypasswordobviosuly –verbose but gave and error, and i'm still not sure how to run direct mysql commmands without using ssh (because i dont know the root password)
编辑:手动安装phpmyadmin,然后手工安装libmcrypt(这是我的cruddy sever技能的一项成果:D),这样phpmyadmin就可以了。然后偶然发现如何通过plesk登录(诀窍是在不选择任何数据库的情况下进入webadmin),至少我认为它是root:S运行sql: GRANT选择mysql。*“用户”@“localhost”;成功的消息又回到plesk,看看我是否可以用“my-user”来管理sql,不,它仍然缺少可用的用户,但是这个名字仍然保留着……尝试运行:mysql_fix_privilege_tables -user =root -password =mypasswordobviosuly -verbose,但提供和错误,我仍然不知道如何在不使用ssh(因为我不知道根密码)的情况下直接运行mysql commmands。
4 个解决方案
#1
4
Found the following when attempting to upgrade. Was directed to the following page: http://kb.parallels.com/en/112290
在尝试升级时发现以下内容。被定向到以下页面:http://kb.parallels.com/en/112290 ?
I ran the following from that page:
我从那一页开始:
"Run the following command for repairing MySQL table:
#mysql_upgrade -T --debug-check -u admin -p`cat /etc/psa/.psa.shadow` mysql"“运行以下命令来修复MySQL表:#mysql_upgrade -T——调试—u admin -p 'cat /etc/ psa/.psa。影子的mysql”
#2
5
I entered mysql via pre-installed phpmyadmin as 'root' like so: (in plesk) home-> database servers -> webadmin. Then choose the "mysql" database, if the table 'servers' is missing (probably some mysql bug) then it will need to be created: choose 'SQL' in 'phpmyadmin' to and run the following sql:
我通过预先安装的phpmyadmin作为“根”进入mysql(在plesk) home->数据库服务器-> webadmin。然后选择“mysql”数据库,如果表“服务器”丢失(可能是一些mysql bug),那么就需要创建它:在“phpmyadmin”中选择“SQL”,并运行以下SQL:
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
so that the table at least exists... then create a new user in plesk, and viola! it works! I was able to login as the user I created after that, it seems like it was some bug with some mysql update I did not even know about.
因此,至少这个表是存在的…然后在plesk和viola中创建一个新的用户!它的工作原理!我可以作为我之后创建的用户登录,这似乎是一些mysql更新的bug,我甚至都不知道。
#3
3
This error can sometimes appear after a new installation of MySQL when the mysql table does not get created properly. Running the command...
当MySQL表没有正确创建时,这个错误有时会出现在新安装MySQL之后。运行命令……
mysql_install_db --user=mysql
from the bash prompt (not the MySQL prompt) will install the table and get things working.
从bash提示符(不是MySQL提示符)将安装该表并使其工作。
After running the command above on a new installation the following command will help secure the install...
在新安装上运行上述命令后,以下命令将帮助安装…
mysql_secure_installation
This will prompt you to enter a root password, remove anonymous access, limit root access to localhost only and remove the test database.
这将提示您输入根密码,删除匿名访问,限制根访问本地主机,并删除测试数据库。
These commands are for Linux, they may not work on Windows but there are corresponding commands if you search the MySQL docs.
这些命令是针对Linux的,它们可能不在Windows上工作,但是如果你搜索MySQL文档,会有相应的命令。
This is not related to the Plesk issue of the original poster but I stumbled upon this question while researching a MySQL installation problem and thought this might help save someone some time.
这与原始海报的Plesk问题无关,但我在研究一个MySQL安装问题时无意中发现了这个问题,并且认为这可能会节省一些时间。
#4
1
It looks like your user does not have access to the mysql
database. You may want to grant the SELECT
command as follows:
看起来您的用户无法访问mysql数据库。您可能希望授予SELECT命令如下:
GRANT SELECT ON mysql.* TO 'your-user'@'localhost';
#1
4
Found the following when attempting to upgrade. Was directed to the following page: http://kb.parallels.com/en/112290
在尝试升级时发现以下内容。被定向到以下页面:http://kb.parallels.com/en/112290 ?
I ran the following from that page:
我从那一页开始:
"Run the following command for repairing MySQL table:
#mysql_upgrade -T --debug-check -u admin -p`cat /etc/psa/.psa.shadow` mysql"“运行以下命令来修复MySQL表:#mysql_upgrade -T——调试—u admin -p 'cat /etc/ psa/.psa。影子的mysql”
#2
5
I entered mysql via pre-installed phpmyadmin as 'root' like so: (in plesk) home-> database servers -> webadmin. Then choose the "mysql" database, if the table 'servers' is missing (probably some mysql bug) then it will need to be created: choose 'SQL' in 'phpmyadmin' to and run the following sql:
我通过预先安装的phpmyadmin作为“根”进入mysql(在plesk) home->数据库服务器-> webadmin。然后选择“mysql”数据库,如果表“服务器”丢失(可能是一些mysql bug),那么就需要创建它:在“phpmyadmin”中选择“SQL”,并运行以下SQL:
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
so that the table at least exists... then create a new user in plesk, and viola! it works! I was able to login as the user I created after that, it seems like it was some bug with some mysql update I did not even know about.
因此,至少这个表是存在的…然后在plesk和viola中创建一个新的用户!它的工作原理!我可以作为我之后创建的用户登录,这似乎是一些mysql更新的bug,我甚至都不知道。
#3
3
This error can sometimes appear after a new installation of MySQL when the mysql table does not get created properly. Running the command...
当MySQL表没有正确创建时,这个错误有时会出现在新安装MySQL之后。运行命令……
mysql_install_db --user=mysql
from the bash prompt (not the MySQL prompt) will install the table and get things working.
从bash提示符(不是MySQL提示符)将安装该表并使其工作。
After running the command above on a new installation the following command will help secure the install...
在新安装上运行上述命令后,以下命令将帮助安装…
mysql_secure_installation
This will prompt you to enter a root password, remove anonymous access, limit root access to localhost only and remove the test database.
这将提示您输入根密码,删除匿名访问,限制根访问本地主机,并删除测试数据库。
These commands are for Linux, they may not work on Windows but there are corresponding commands if you search the MySQL docs.
这些命令是针对Linux的,它们可能不在Windows上工作,但是如果你搜索MySQL文档,会有相应的命令。
This is not related to the Plesk issue of the original poster but I stumbled upon this question while researching a MySQL installation problem and thought this might help save someone some time.
这与原始海报的Plesk问题无关,但我在研究一个MySQL安装问题时无意中发现了这个问题,并且认为这可能会节省一些时间。
#4
1
It looks like your user does not have access to the mysql
database. You may want to grant the SELECT
command as follows:
看起来您的用户无法访问mysql数据库。您可能希望授予SELECT命令如下:
GRANT SELECT ON mysql.* TO 'your-user'@'localhost';