Changes

Jump to navigation Jump to search

Mini Servers: MySQL problems

241 bytes added, 01:20, 24 November 2010
no edit summary
=[http://ujybyqum.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
{{Uc nav mini servers}}
'''MySQL problems'''
'''No other servers running:'''
<&lt;pre>&gt;L:\bin>&gt;mysqladmin --user=root --password=root status
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to MySQL server on 'localhost' (10061)'
Check that mysqld is running on localhost and that the port is 3306.
You can check this by doing 'telnet localhost 3306'
<&lt;/pre>&gt;
You can force a port as follows:
<&lt;pre>&gt;L:\bin>&gt;mysqladmin --port=3313 --user=root --password=root status
Uptime: 816 Threads: 1 Questions: 2 Slow queries: 0 Opens: 11 Flush tables: 1 Open tables: 2 Queries per second a
vg: 0.002
<&lt;/pre>&gt;
This clearly works like I said there is no configuration file on the search paths:
<&lt;pre>&gt;
Default options are read from the following files in the given order:
C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf
<&lt;/pre>&gt;
Interestingly it does not look in the folder from where the client is run (normally the default with most programs)
You can force a client to read a default file as follows:
<&lt;pre>&gt;
--defaults-file=my.cnf (this file is contained in the folder with the execuitable folder bin)
<&lt;/pre>&gt;
Hence this will give:
<&lt;pre>&gt;L:\bin>&gt;mysqladmin --defaults-file=my.cnf --user=root --password=root status
Uptime: 1628 Threads: 1 Questions: 3 Slow queries: 0 Opens: 11 Flush tables: 1 Open tables: 2 Queries per second
avg: 0.002
L:\bin>&gt;<&lt;/pre>&gt;
'''''[[#top | Top]]'''''
Open mysql_start.bat this line forces the server to use the correct configuration file:
<&lt;pre>&gt;
start \bin\mysqld-opt.exe --defaults-file=/bin/my.cnf
<&lt;/pre> &gt;
'''''[[#top | Top]]'''''
Running server as a service (mini server 14) identical paths are searched again the configuration file will not be found. The server needs to be forced to read the configuration file however there is a little twist to this:
<&lt;pre>&gt;
The following options may be given as the first argument:
--defaults-file=# Only read default options from the given file #
<&lt;/pre>&gt;
From the above this would be a logical (Install.bat):
<&lt;pre>&gt;
C:\mini_server_14\bin\mysqld-opt.exe --defaults-file=C:/mini_server_14/bin/my.cnf --install mini_server_14
<&lt;/pre>&gt;
However it produces this error:
<&lt;pre>&gt;
Installing MySQL Service ...
The filename, directory name, or volume label syntax is incorrect.
More help is available by typing NET HELPMSG 2185.
Press any key to continue . . .
<&lt;/pre>&gt;
Well that was a real pain I know the install option works on its own so perhaps it’s the order of commands. I tried the following with success:
<&lt;pre>&gt;
C:\mini_server_14\bin\mysqld-opt.exe --install mini_server_14 --defaults-file=C:/mini_server_14/bin/my.cnf
<&lt;/pre>&gt;
==== Clients ====
== Mini Server 12 MySQL 5.0.51b Service ==
To obtain information about the server type the following at a command prompt:
<&lt;pre>&gt;mysqld-opt --verbose --help > &gt; info.txt<&lt;/pre>&gt;
This creates a file where you can read the details at your own leisure. Of importance is this line:
<&lt;pre>&gt;
Default options are read from the following files in the given order:
C:\my.ini C:\my.cnf C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\mini_server_12\my.ini C:\mini_server_12\my.cnf
<&lt;/pre>&gt;
Both clients also produce a similar result (mysqladmin --help and mysql --help) for the search path. Placing the configuration file in folder C:\mini_server_12 allows it to be picked up by the three application.
322

edits

Navigation menu