[Mysql-server-5.0]Missing socket files and denied acess to root user
am 03.04.2010 00:24:27 von Carlos Andrade
--0016e6d566696d8271048348725a
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello MySQL Community,
I'm new around, and I'm a new mysql user. I use mysql mostly together with
Moodle to support many courses on a public university in Brazil (UFBA).
Recently, I was trying to use Reverse Engineering on Workbench to catch a
relationship diagram for moodle, and so I've attempted to make foreign keys
there on. For that, I need to make mysql logs be saved as tables instead of
file.
This is where my trouble started.
According to a windows user, he could do that on my.ini , and I didn't find
that on Ubuntu 9.04, so I've tried to run a command I found on Mysql
Reference manual, 5.1. located on (
http://dev.mysql.com/doc/refman/5.1/en/log-tables.html).
So I attempted something like #mysql -u"mydbrootid" -p"mydbrootpass"
--log-output=3DTABLE
After that and other few tempts trying that, suddently my root was not able
to acess mysql anymore.
I tried to delete, move, reinstall and everything you can imagine but it
just seems I made things worse, so I tried to purge every mysql file from m=
y
PC, together with php5-mysql and apache2.
After that I installed apache2, and then tried to install by aptitude
mysql-server-5.0
In this point, i'm stucked, I get the following error while on the
mysql-server-5.0 install process:
root@midgard:/etc/init.d# apt-get install mysql-server-5.0
Lendo listas de pacotes... Pronto
Construindo =E1rvore de depend=EAncias
Lendo informação de estado... Pronto
Os pacotes extra a seguir ser=E3o instalados:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl
libplrpc-perl mysql-client-5.0 mysql-server-core-5.0
Pacotes sugeridos:
dbishell libipc-sharedcache-perl mysql-doc-5.0 tinyca mailx
Os NOVOS pacotes a seguir ser=E3o instalados:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl
libplrpc-perl mysql-client-5.0 mysql-server-5.0 mysql-server-core-5.0
0 pacotes atualizados, 8 pacotes novos instalados, 0 a serem removidos e 0
n=E3o atualizados.
=C9 preciso baixar 874kB/35,9MB de arquivos.
Depois desta operação, 110MB adicionais de espa=E7o em disco ser=E3o us=
ados.
Voc=EA quer continuar [S/n]? S
Obter:1 http://br.archive.ubuntu.com jaunty/main libnet-daemon-perl 0.43-1
[46,9kB]
Obter:2 http://br.archive.ubuntu.com jaunty/main libplrpc-perl 0.2020-1
[36,0kB]
Obter:3 http://br.archive.ubuntu.com jaunty/main libdbi-perl 1.607-1 [791kB=
]
Baixados 874kB em 10s (83,6kB/s)
Pr=E9-configurando pacotes ...
Selecionando pacote previamente n=E3o selecionado libnet-daemon-perl.
(Lendo banco de dados ... 185830 arquivos e diret=F3rios atualmente
instalados).
Desempacotando libnet-daemon-perl (de .../libnet-daemon-perl_0.43-1_all.deb=
)
....
Selecionando pacote previamente n=E3o selecionado libplrpc-perl.
Desempacotando libplrpc-perl (de .../libplrpc-perl_0.2020-1_all.deb) ...
Selecionando pacote previamente n=E3o selecionado libdbi-perl.
Desempacotando libdbi-perl (de .../libdbi-perl_1.607-1_i386.deb) ...
Selecionando pacote previamente n=E3o selecionado libdbd-mysql-perl.
Desempacotando libdbd-mysql-perl (de .../libdbd-mysql-perl_4.008-1_i386.deb=
)
....
Selecionando pacote previamente n=E3o selecionado mysql-client-5.0.
Desempacotando mysql-client-5.0 (de
..../mysql-client-5.0_5.1.30really5.0.75-0ubuntu10.3_i386.de b) ...
Selecionando pacote previamente n=E3o selecionado mysql-server-core-5.0.
Desempacotando mysql-server-core-5.0 (de
..../mysql-server-core-5.0_5.1.30really5.0.75-0ubuntu10.3_i3 86.deb) ...
Selecionando pacote previamente n=E3o selecionado mysql-server-5.0.
Desempacotando mysql-server-5.0 (de
..../mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.3_i386.de b) ...
Selecionando pacote previamente n=E3o selecionado libhtml-template-perl.
Desempacotando libhtml-template-perl (de
..../libhtml-template-perl_2.9-1_all.deb) ...
Processando gatilhos para man-db ...
Configurando libnet-daemon-perl (0.43-1) ...
Configurando libplrpc-perl (0.2020-1) ...
Configurando libdbi-perl (1.607-1) ...
Configurando libdbd-mysql-perl (4.008-1) ...
Configurando mysql-client-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
Configurando mysql-server-core-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
Configurando mysql-server-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
* Stopping MySQL database server mysqld
[ OK ]
100402 17:36:21 [ERROR] /usr/sbin/mysqld: Can't find file:
'./mysql/user.frm' (errno: 13)
100402 17:36:21 [ERROR] /usr/sbin/mysqld: Can't find file:
'./mysql/user.frm' (errno: 13)
ERROR: 1017 Can't find file: './mysql/user.frm' (errno: 13)
100402 17:36:21 [ERROR] Aborting
100402 17:36:21 [Note] /usr/sbin/mysqld: Shutdown complete
* Reloading AppArmor profiles ...
[ OK ]
* /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See
README.Debian.gz
* Starting MySQL database server mysqld
[fail]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: erro processando mysql-server-5.0 (--configure):
sub-processo post-installation script retornou estado de sa=EDda de erro 1
Configurando libhtml-template-perl (2.9-1) ...
Erros foram encontrados durante o processamento de:
mysql-server-5.0
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@midgard:/etc/init.d#
Which makes me believe that my socket file is gone when I went removing
files, and no matter how I try to install it it wont come back. Same goes
for the my.cnf file.
Does anyone have any clue to work this around? I couldn't find on google.
Hope I did not post on the wrong list.
Thank you,
Carlos Andrade
--0016e6d566696d8271048348725a--
Re: [Mysql-server-5.0]Missing socket files and denied acess to root
am 03.04.2010 17:22:29 von Carlos Andrade
--0016e6d566692d9393048356abd1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hello,
(First let me remember that my OS is Ubuntu 9.04)
I've found a solution today few minutes ago, so I'm posting here since I've
sound so many posts around the web and not a single solution seemed to solv=
e
my problem.
Its actually pretty simple. My real problem was related to the my.cnf and
the socket as stated before. The my.cnf could be replaced by installing the
mysql-common package which contain the most common files (and which include=
s
my.cnf),
#aptitude install mysql-common (try aptitude search with mysql- prefix in
case that doesn't works, i'm not absolutely certain about each char).
After that the socket was still missing. I've rebooted my machine and
noticed that my old kernel had no issues with starting mysql. So I opened
the folder and saw the socket there on /var/run/mysqld
Then it came to my mind the dpkg, and that on the GRUB window (the black on=
e
when you restart your pc) it shows the 'recovery mode' version. I ran that
for the last kernel version of mine that had the issue, and then selected
the dpkg.
Dpkg has a function to 'recover broken packages', and by this time I had th=
e
mysql-server-5.0 broken (I couldnt start it, and i did not uninstall it). I
believe you can verify the status by using #aptitude search mysql-server
and checking if its 'i' or 'c' by the left corner of the terminal window an=
d
the package name.
So, after fixing it by dpkg, the socket came back to its proper place and
now mysql restart smootly.
Thats it.
Regards,
Carlos Andrade
2010/4/2 Carlos Andrade
> Hello MySQL Community,
>
> I'm new around, and I'm a new mysql user. I use mysql mostly together wit=
h
> Moodle to support many courses on a public university in Brazil (UFBA).
>
> Recently, I was trying to use Reverse Engineering on Workbench to catch a
> relationship diagram for moodle, and so I've attempted to make foreign ke=
ys
> there on. For that, I need to make mysql logs be saved as tables instead =
of
> file.
>
> This is where my trouble started.
>
> According to a windows user, he could do that on my.ini , and I didn't fi=
nd
> that on Ubuntu 9.04, so I've tried to run a command I found on Mysql
> Reference manual, 5.1. located on (
> http://dev.mysql.com/doc/refman/5.1/en/log-tables.html).
>
> So I attempted something like #mysql -u"mydbrootid" -p"mydbrootpass"
> --log-output=3DTABLE
>
> After that and other few tempts trying that, suddently my root was not ab=
le
> to acess mysql anymore.
>
> I tried to delete, move, reinstall and everything you can imagine but it
> just seems I made things worse, so I tried to purge every mysql file from=
my
> PC, together with php5-mysql and apache2.
>
> After that I installed apache2, and then tried to install by aptitude
> mysql-server-5.0
>
> In this point, i'm stucked, I get the following error while on the
> mysql-server-5.0 install process:
>
> root@midgard:/etc/init.d# apt-get install mysql-server-5.0
> Lendo listas de pacotes... Pronto
> Construindo =E1rvore de depend=EAncias
> Lendo informação de estado... Pronto
> Os pacotes extra a seguir ser=E3o instalados:
> libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl
> libplrpc-perl mysql-client-5.0 mysql-server-core-5.0
> Pacotes sugeridos:
> dbishell libipc-sharedcache-perl mysql-doc-5.0 tinyca mailx
> Os NOVOS pacotes a seguir ser=E3o instalados:
> libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl
> libplrpc-perl mysql-client-5.0 mysql-server-5.0 mysql-server-core-5.0
> 0 pacotes atualizados, 8 pacotes novos instalados, 0 a serem removidos e =
0
> n=E3o atualizados.
> =C9 preciso baixar 874kB/35,9MB de arquivos.
> Depois desta operação, 110MB adicionais de espa=E7o em disco ser=E3o =
usados.
> Voc=EA quer continuar [S/n]? S
> Obter:1 http://br.archive.ubuntu.com jaunty/main libnet-daemon-perl 0.43-=
1
> [46,9kB]
> Obter:2 http://br.archive.ubuntu.com jaunty/main libplrpc-perl 0.2020-1
> [36,0kB]
> Obter:3 http://br.archive.ubuntu.com jaunty/main libdbi-perl 1.607-1
> [791kB]
> Baixados 874kB em 10s (83,6kB/s)
>
>
> Pr=E9-configurando pacotes ...
> Selecionando pacote previamente n=E3o selecionado libnet-daemon-perl.
> (Lendo banco de dados ... 185830 arquivos e diret=F3rios atualmente
> instalados).
> Desempacotando libnet-daemon-perl (de
> .../libnet-daemon-perl_0.43-1_all.deb) ...
> Selecionando pacote previamente n=E3o selecionado libplrpc-perl.
> Desempacotando libplrpc-perl (de .../libplrpc-perl_0.2020-1_all.deb) ...
> Selecionando pacote previamente n=E3o selecionado libdbi-perl.
> Desempacotando libdbi-perl (de .../libdbi-perl_1.607-1_i386.deb) ...
> Selecionando pacote previamente n=E3o selecionado libdbd-mysql-perl.
> Desempacotando libdbd-mysql-perl (de
> .../libdbd-mysql-perl_4.008-1_i386.deb) ...
> Selecionando pacote previamente n=E3o selecionado mysql-client-5.0.
> Desempacotando mysql-client-5.0 (de
> .../mysql-client-5.0_5.1.30really5.0.75-0ubuntu10.3_i386.deb ) ...
> Selecionando pacote previamente n=E3o selecionado mysql-server-core-5.0.
> Desempacotando mysql-server-core-5.0 (de
> .../mysql-server-core-5.0_5.1.30really5.0.75-0ubuntu10.3_i38 6.deb) ...
> Selecionando pacote previamente n=E3o selecionado mysql-server-5.0.
> Desempacotando mysql-server-5.0 (de
> .../mysql-server-5.0_5.1.30really5.0.75-0ubuntu10.3_i386.deb ) ...
> Selecionando pacote previamente n=E3o selecionado libhtml-template-perl.
> Desempacotando libhtml-template-perl (de
> .../libhtml-template-perl_2.9-1_all.deb) ...
> Processando gatilhos para man-db ...
> Configurando libnet-daemon-perl (0.43-1) ...
> Configurando libplrpc-perl (0.2020-1) ...
> Configurando libdbi-perl (1.607-1) ...
> Configurando libdbd-mysql-perl (4.008-1) ...
> Configurando mysql-client-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
> Configurando mysql-server-core-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
> Configurando mysql-server-5.0 (5.1.30really5.0.75-0ubuntu10.3) ...
> * Stopping MySQL database server mysqld
>
> [ OK ]
> 100402 17:36:21 [ERROR] /usr/sbin/mysqld: Can't find file:
> './mysql/user.frm' (errno: 13)
> 100402 17:36:21 [ERROR] /usr/sbin/mysqld: Can't find file:
> './mysql/user.frm' (errno: 13)
> ERROR: 1017 Can't find file: './mysql/user.frm' (errno: 13)
>
>
> 100402 17:36:21 [ERROR] Aborting
>
> 100402 17:36:21 [Note] /usr/sbin/mysqld: Shutdown complete
>
> * Reloading AppArmor profiles ...
>
> [ OK ]
> * /etc/init.d/mysql: WARNING: /etc/mysql/my.cnf cannot be read. See
> README.Debian.gz
> * Starting MySQL database server mysqld
>
> [fail]
> invoke-rc.d: initscript mysql, action "start" failed.
> dpkg: erro processando mysql-server-5.0 (--configure):
> sub-processo post-installation script retornou estado de sa=EDda de erro=
1
> Configurando libhtml-template-perl (2.9-1) ...
> Erros foram encontrados durante o processamento de:
> mysql-server-5.0
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> root@midgard:/etc/init.d#
>
> Which makes me believe that my socket file is gone when I went removing
> files, and no matter how I try to install it it wont come back. Same goes
> for the my.cnf file.
>
> Does anyone have any clue to work this around? I couldn't find on google.
>
> Hope I did not post on the wrong list.
>
> Thank you,
>
> Carlos Andrade
>
--0016e6d566692d9393048356abd1--