Partage
  • Partager sur Facebook
  • Partager sur Twitter

[MYSQL]: problème de connections

réinstallation, suppression, purge... je prend une corde ?

Sujet résolu
25 juin 2012 à 20:14:35

Bonjour,
bon déja premiere info j'ai jamais dépassé mes connaissance en sql au niveau de 'je vais des roquette(*) en php'
mais la Je suis devant Putty connecté a un serveur ubuntu 12.04 :p
j'ai installer la suite apache/php/mysql il y a 2 mois, et la je suis en train de chercher comment on
change le mdp de se dernier, quand je tape mysql dans la console j'ai :
root@server:~# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@server:~#

donc je désinstalle a grand coups de apt-get install mysql-server
je réinstalle et toujours pareille*

si quelqu'un veux bien m'aider, je suis prêt a filé mon ip/user/mdp en MP

edit: ma page phpmyadmin: http://mynewood.servegame.com/phpmyadmin
  • Partager sur Facebook
  • Partager sur Twitter
26 juin 2012 à 12:13:22

Pour te connecter, c'est mysql -u root -p
Ensuite tu fais:
GRANT ALL PRIVILEGES on *.* to 'root'@'localhost' identified by 'ton nouveaumotdepasse';
flush privileges;

Et hop !

  • Partager sur Facebook
  • Partager sur Twitter
26 juin 2012 à 17:50:28

prod@server:~$ mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


ah! trop facile si j'avais le mots de passe! ^^
  • Partager sur Facebook
  • Partager sur Twitter
26 juin 2012 à 18:18:00

voila mes manip':
root@server:~# /etc/init.d/mysql stop
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop mysql
Graph this data and manage this system at https://landscape.canonical.com/


root@server:~# mysqld --skip-grant-tables --skip-networking &
[1] 18188
root@server:~# 120626 18:15:49 [Note] Plugin 'FEDERATED' is disabled.
120626 18:15:49 InnoDB: The InnoDB memory heap is disabled
120626 18:15:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
120626 18:15:49 InnoDB: Compressed tables use zlib 1.2.3.4
120626 18:15:49 InnoDB: Initializing buffer pool, size = 128.0M
120626 18:15:49 InnoDB: Completed initialization of buffer pool
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
120626 18:15:49  InnoDB: Retrying to lock the first data file
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.


les lignes:
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.

tourne en boucles

EDIT: si tu veux je te mp l'adresse du serveur ainsi que les mdp root
t'as cas mètre un mdp aléatoires et me le renvoyé !
  • Partager sur Facebook
  • Partager sur Twitter
27 juin 2012 à 10:30:37

Problème résolut grace a elalitte, merci a lui :)
  • Partager sur Facebook
  • Partager sur Twitter
4 février 2013 à 15:03:14

Salut,

Une explication sur la résolution de ce problème par trop peu récurant, aurait été fortement apprécier ... ^¿^

 ~ # mysqld                
130204 14:48:34 [Note] Plugin 'FEDERATED' is disabled.
130204 14:48:34  InnoDB: Initializing buffer pool, size = 8.0M                                              
130204 14:48:34  InnoDB: Completed initialization of buffer pool                                      
InnoDB: Unable to lock ./ibdata1, error: 11   
InnoDB: Check that you do not already have another mysqld process                                    
InnoDB: using the same InnoDB data or log files.  
130204 14:48:34  InnoDB: Retrying to lock the first data file                                           
InnoDB: Unable to lock ./ibdata1, error: 11   
InnoDB: Check that you do not already have another mysqld process                                       
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11      

...

nnoDB: using the same InnoDB data or log files.
130204 14:50:14  InnoDB: Unable to open the first data file  
InnoDB: Error in opening ./ibdata1                  
130204 14:50:14  InnoDB: Operating system error number 11 in a file operation.                                      
InnoDB: Error number 11 means 'Resource temporarily unavailable'. 
InnoDB: Some operating system error numbers are described at                                
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html                                
InnoDB: Could not open or create data files.       
InnoDB: If you tried to add new data files, and it failed here,                                                      
InnoDB: you should now edit innodb_data_file_path in my.cnf back                                                  
InnoDB: to what it was, and remove the new ibdata files InnoDB created                                         
InnoDB: in this failed attempt. InnoDB only wrote those files full of                                       
InnoDB: zeros, but did not yet use them in any way. But be careful: do not                                   
InnoDB: remove old data files which contain your precious data!                                                
130204 14:50:14 [ERROR] Plugin 'InnoDB' init function returned error.                                            
130204 14:50:14 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.                                        
130204 14:50:14 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use                            
130204 14:50:14 [ERROR] Do you already have another mysqld server running on port: 3306 ?                       
130204 14:50:14 [ERROR] Aborting                                                 
130204 14:50:14 [Note] mysqld: Shutdown complete                                            
 ~ #        



-
Edité par loreleil 4 février 2013 à 15:27:13

  • Partager sur Facebook
  • Partager sur Twitter
4 février 2013 à 15:55:34

Salut,

elalitte a écrit:

Zut, ça remonte à trop loin et je me rappelle plus du tout ce que j'avais fait :-/

 Grrr ... Tanpis alors ...

Dans ma quête sur la toile, une solution plus que temporaire vraisemblablement ...

 ~ # mv /var/lib/mysql/ibdata1 /var/lib/mysql/ibdata1.bak
mv : voulez-vous écraser « /var/lib/mysql/ibdata1.bak » ? y

 ~ # cp -a /var/lib/mysql/ibdata1.bak /var/lib/mysql/ibdata1

 ~ # /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
 ~ #

 ~ # mysqld
130204 15:47:25 [Note] Plugin 'FEDERATED' is disabled.
130204 15:47:25  InnoDB: Initializing buffer pool, size = 8.0M
130204 15:47:25  InnoDB: Completed initialization of buffer pool
130204 15:47:25  InnoDB: Started; log sequence number 0 44233
130204 15:47:25 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
130204 15:47:25 [ERROR] Do you already have another mysqld server running on port: 3306 ?
130204 15:47:25 [ERROR] Aborting

130204 15:47:25  InnoDB: Starting shutdown...
130204 15:47:30  InnoDB: Shutdown completed; log sequence number 0 44233
130204 15:47:30 [Note] mysqld: Shutdown complete

 ~ #





  • Partager sur Facebook
  • Partager sur Twitter
4 février 2013 à 17:53:37

A priori non, il dit qu'un service est déjà en écoute sur le port 3306 et qu'il ne peut pas se lancer...
  • Partager sur Facebook
  • Partager sur Twitter
4 février 2013 à 18:39:02

Certes, cependant netstat (entre autre) ne semble pas du même avis ... :(

 ~ # lsof -i -n -P
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
lwresd   938     root  512u  IPv4   3907      0t0  UDP 127.0.0.1:921
mysqld  1062    mysql   10u  IPv4   3996      0t0  TCP 127.0.0.1:3306 (LISTEN)
apache2 1297     root    4u  IPv6   5330      0t0  TCP *:80 (LISTEN)
sshd    1331     root    3u  IPv4   5387      0t0  TCP *:22 (LISTEN)
sshd    1331     root    4u  IPv6   5391      0t0  TCP *:22 (LISTEN)
apache2 1420 www-data    4u  IPv6   5330      0t0  TCP *:80 (LISTEN)
apache2 1421 www-data    4u  IPv6   5330      0t0  TCP *:80 (LISTEN)
apache2 1422 www-data    4u  IPv6   5330      0t0  TCP *:80 (LISTEN)
apache2 1423 www-data    4u  IPv6   5330      0t0  TCP *:80 (LISTEN)
apache2 1424 www-data    4u  IPv6   5330      0t0  TCP *:80 (LISTEN)
sshd    2070     root    3r  IPv4  11210      0t0  TCP yyy.yyy.yyy.yyy:22->xxx.xxx.xxx.xxx:55572 (ESTABLISHED)
sshd    2072 USER    3u  IPv4  11210      0t0  TCP yyy.yyy.yyy.yyy:22->xxx.xxx.xxx.xxx:55572 (ESTABLISHED)
 ~ #



 ~ # netstat -nape --inet
Connexions Internet actives (serveurs et établies)
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat        User       Inode       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      103        3996        1062/mysqld
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          5387        1331/sshd
tcp        0      0 yyy.yyy.yyy.yyy:22      xxx.xxx.xxx.xxx:55572   ESTABLISHED 0          11210       2070/sshd: USER
udp        0      0 127.0.0.1:921           0.0.0.0:*                           0          3907        938/lwresd
raw        0      0 0.0.0.0:6               0.0.0.0:*               7           0          6781        1383/portsentry
raw        0      0 0.0.0.0:17              0.0.0.0:*               7           0          7646        1387/portsentry
 ~ #



 ~ # netstat -tlnp
Connexions Internet actives (seulement serveurs)
Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat        PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1062/mysqld
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1331/sshd
tcp6       0      0 :::80                   :::*                    LISTEN      1297/apache2
tcp6       0      0 :::22                   :::*                    LISTEN      1331/sshd
 ~ #



 ~ # ss -p | grep STA
ESTAB      0      0           yyy.yyy.yyy.yyy:ssh             xxx.xxx.xxx.xxx:55572    users:(("sshd",2070,3),("sshd",2072,3))
 ~ #



 ~ # netstat -tapln | grep 3306
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1062/mysqld
 ~ #



~ # ps -ef | grep mysqld  
root       937     1  0 18:09 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     1062   937  0 18:09 ?        00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306
root      1063   937  0 18:09 ?        00:00:00 logger -t mysqld -p daemon.error
root      2832  2181  0 18:22 pts/0    00:00:00 grep --color=tty -d skip mysqld
 ~ #




 ~ # ll /var/run/mysqld
total 4,0K
-rw-rw---- 1 mysql mysql 5 2013-02-04 18:09 mysqld.pid
srwxrwxrwx 1 mysql mysql 0 2013-02-04 18:09 mysqld.sock
 ~ #


À ton avis ?

  • Partager sur Facebook
  • Partager sur Twitter
5 février 2013 à 9:42:39

Salut,

elalitte a écrit:

Bah il semblerait que si avec le processus 1062 qui est en écoute sur le port 3306

Et moi qui croyais que ceci été dans la normalité ...

Pour l'heure j'ai désactivé les tables InnoDB.

Je suis sur un serveur (ovh) qui me sert de labo (aucune création de base), mais un deuxième est en prod et il comporte les mêmes symptômes lors d'un check.

* labo

 ~ # mysqld
130205  9:18:24 [Note] Plugin 'FEDERATED' is disabled.
130205  9:18:24 [Note] Plugin 'InnoDB' is disabled.
130205  9:18:24 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
130205  9:18:24 [ERROR] Do you already have another mysqld server running on port: 3306 ?
130205  9:18:24 [ERROR] Aborting

130205  9:18:24 [Note] mysqld: Shutdown complete

 ~ #



~ # netstat -l | grep mysql
tcp        0      0 localhost.localdo:mysql *:*                     LISTEN
unix  2      [ ACC ]     STREAM     LISTENING     257698   /var/run/mysqld/mysqld.sock
 ~ #

Avez-vous déjà un autre serveur mysqld qui fonctionne sur le port: 3306? :o






-
Edité par loreleil 5 février 2013 à 9:45:06

  • Partager sur Facebook
  • Partager sur Twitter
5 février 2013 à 9:53:30

Il faut que tu commences par couper le service en écoute sur le port 3306 pour pouvoir le relancer.

Donc tu peux faire un 

kill -9 1062

par exemple.

  • Partager sur Facebook
  • Partager sur Twitter
29 novembre 2016 à 18:19:21

Bonjour, j'ai suivi le cours openclassroom "Administré vos bases de données avec Mysql", mais seulement après 30 minute de cours il m'est totalement impossible de faire quoi que ce soit, en effet mon terminal m'affiche

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

j'ai tous essayé mais rien ne marche.... 
 sudo mysqladmin -u root -h localhost password votre_mot_de_passe
mysql -h localhost -u root -p
  • Partager sur Facebook
  • Partager sur Twitter
19 août 2020 à 20:04:07 - Message modéré pour le motif suivant : Merci de créer votre propre sujet


19 août 2020 à 20:55:40

Bonjour,

Déterrage

Citation des règles générales du forum :

Avant de poster un message, vérifiez la date du sujet dans lequel vous comptiez intervenir.

Si le dernier message sur le sujet date de plus de deux mois, mieux vaut ne pas répondre.
En effet, le déterrage d'un sujet nuit au bon fonctionnement du forum, et l'informatique pouvant grandement changer en quelques mois il n'est donc que rarement pertinent de déterrer un vieux sujet.

Au lieu de déterrer un sujet il est préférable :

  • soit de contacter directement le membre voulu par messagerie privée en cliquant sur son pseudonyme pour accéder à sa page profil, puis sur le lien "Ecrire un message"
  • soit de créer un nouveau sujet décrivant votre propre contexte
  • ne pas répondre à un déterrage et le signaler à la modération

Je ferme ce sujet. En cas de désaccord, me contacter par MP.

  • Partager sur Facebook
  • Partager sur Twitter