mirror of
https://github.com/webmin/webmin.git
synced 2026-06-20 03:10:30 +01:00
Fix handling of missing my.cnf file when using remote mysql https://sourceforge.net/p/webadmin/bugs/4578/
This commit is contained in:
@@ -66,6 +66,16 @@ if ($r > 0 && !&working_env_pass()) {
|
||||
exit;
|
||||
}
|
||||
|
||||
# Check if my.cnf was found
|
||||
if (&is_mysql_local() && $config{'my_cnf'} && !-r $config{'my_cnf'}) {
|
||||
&ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
|
||||
&help_search_link("mysql", "man", "doc", "google"));
|
||||
print &text('index_ecnf', "<tt>$config{'my_cnf'}</tt>",
|
||||
"../config.cgi?$module_name"),"<p>\n";
|
||||
&ui_print_footer("/", $text{'index'});
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($r == 0) {
|
||||
# Not running .. need to start it
|
||||
&main_header();
|
||||
|
||||
@@ -28,6 +28,7 @@ index_nomod=Warning: The Perl module $1 is not installed on your system, so Webm
|
||||
index_nomods=Warning: The Perl modules $1 and $2 are not installed on your system, so Webmin will not be able to reliably access your MySQL database. <a href='$3'>Click here</a> to install them now.
|
||||
index_mysqlver=The command <tt>$1</tt> returned :
|
||||
index_eenvpass=The MySQL client program $1 does not accept passwords passed using the <tt>MYSQL_PWD</tt> environment variable. To ensure that Webmin is able to fully communicate with MySQL, this option should be turned off on the <a href='$2'>module configuration</a> page. Alternately, you can remove any password set in the <tt>root</tt> user's <tt>.my.cnf</tt> file.
|
||||
index_ecnf=The MySQL config file $1 was not found on your system. Use the <a href='$2'>module configuration</a> page to set the correct path.
|
||||
index_nodbs=You do not have access to any MySQL databases.
|
||||
index_nodbs2=No MySQL databases were found on your system.
|
||||
index_nodbs3=No MySQL databases matched your search.
|
||||
|
||||
Reference in New Issue
Block a user