Is it somehow possible to generate a config file my.cnf
from the running MySQL server?
是否有可能从正在运行的MySQL服务器生成配置文件my.cnf?
I have accidentally removed our my.cnf file and I need to re-create it in an honorable fashion.
我不小心删除了my.cnf文件,我需要以一种光荣的方式重新创建它。
Instead of nano /etc/mysql/my.cnf
I went rm /etc/mysql/my.cnf
.
而不是nano /etc/mysql/my.cnf我去了rm /etc/mysql/my.cnf。
Days like these...
这些日子......
1 个解决方案
#1
0
Try: nano /etc/mysql/my.cnf and put these values.
尝试:nano /etc/mysql/my.cnf并输入这些值。
[client]
user = DBUSERNAME
password = DBPASSWORD
host = DBSERVER
[mysql]
database = DBNAME
Where DBUSERNAME, DBPASSWORD, DBSERVER and DBNAME should be replaced with your own correct database username, database hostname, database name and database password. You will not have any of these until you create a database through your Control Panel.
其中DBUSERNAME,DBPASSWORD,DBSERVER和DBNAME应替换为您自己的正确数据库用户名,数据库主机名,数据库名和数据库密码。在通过“控制面板”创建数据库之前,您将不会拥有任何这些内容。
#1
0
Try: nano /etc/mysql/my.cnf and put these values.
尝试:nano /etc/mysql/my.cnf并输入这些值。
[client]
user = DBUSERNAME
password = DBPASSWORD
host = DBSERVER
[mysql]
database = DBNAME
Where DBUSERNAME, DBPASSWORD, DBSERVER and DBNAME should be replaced with your own correct database username, database hostname, database name and database password. You will not have any of these until you create a database through your Control Panel.
其中DBUSERNAME,DBPASSWORD,DBSERVER和DBNAME应替换为您自己的正确数据库用户名,数据库主机名,数据库名和数据库密码。在通过“控制面板”创建数据库之前,您将不会拥有任何这些内容。