Daniel Lacal writes:
> I've installed MySQL and first of all, when I run >mysqladmin version it crashes
(appears a error message), I thought that the reason could be because the file mysql.sock
isn't there. So I've reinstalled MySQL and mysql.sock now can be found where mysql install
it (/tmp) and in the directory where it goes to look for /var/lib/mysql/) and now it works
but only it I put the full path (/usr/local/mysql/bin/mysqladmin version), for example if
I type mysqladmin anywhere the error that appears is the same:
>
> mysqladmin: connect to server at 'localhost' failed
> error: 'Can't connect to local MySQL server (2)'
> Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock'
exists!
>
> Is mysql well installed?
Hi!
First, it doesn't mean that mysqladmin crashed, if it was
unable to connect to MySQL server. :)
You shouldn't have normally mysql.sock (or whatever you name it)
the socket file in several places, unless you wish to
start many mysqld -servers taking connections through different
sockets.
What does
shell> which mysqladmin
tell you?
Then try: shell> mysqld --help, and where is the socket file
meant to be?
Note that you cant change that variable by starting
shell> mysqld --socket=...
Did you configure with
./configure --with-unix-socket-path=/var/lib/mysql ?
It seems to me that at the first time you installed
MySQL with the above switch and did make install afterwards.
Now your mysqladmin -binary is located somewhere in your machine,
in your PATH. That mysqladmin -version is trying to search
for the unix -socket file from /var/lib/mysql.
When you installed the MySQL again, you didn't specify
the switch above, and that mysqladmin -version is trying
to search the socket -file from it's default place, /tmp.
Have you configured the .my.cnf -file?
With the information you give, I can't give you very
specific instructions. I would recommend you to
completely uninstall both MySQL -versions you installed
and then install again. Please carefully read the README
and installation directions before you install.
Be careful, if you change any options to ./configure,
or to mysqld etc, you then need to know what you are doing.
If you are still in problems, please read the section
'How to report bugs or problems' from the manual.
You forgot to mention, if you are using the source
distribution, or a binary version, or both, for example.
..and the platform you are using.. please use mysqlbug.
Regards,
- Jani
--
+---------------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ == mysql@stripped |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Jani Tolonen |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto: jani@stripped |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Helsinki |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|_____ Finland |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+---------------------------------------------------------------------+