View previous topic :: View next topic |
Author |
Message |
GaMeS Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/193027462944673094b624f.jpg)
Joined: 08 Nov 2005 Posts: 374 Location: Nantes
|
Posted: Sun Nov 13, 2005 3:56 pm Post subject: [mySQL]Impossible de se connecter a mySQL [Résolu] |
|
|
Bonjour,
Cela peut parraitre redondant comme post mais j'ai essayé de cherché sur ce forum les différentes solutions proposé mais aucune ne correspondait...
Google de même...
Code: |
antec ~ # mysql_install_db
Installing all prepared tables
Fill help tables
To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h antec password 'new-password'
See the manual for more instructions.
NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com
|
ensuite je veux spécifié un mot de passe a la base de donnée..mais impossible..
j'ai essayé beaucoup de vos solution..aucune ne semble fonctionné..
Code: |
antec ~ # mysqladmin -u root password 'a1b2c3'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
antec ~ # mysqladmin -u root -h localhost password 'a1b2c3'
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)
antec ~ # mysqladmin -u root -h localhost password 'a1b2c3' -p
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
antec ~ # /etc/init.d/mysql status
* status: started
antec ~ # mysqladmin -u root -h antec password 'a1b2c3'
mysqladmin: connect to server at 'antec' failed
error: 'Lost connection to MySQL server during query
|
J'ai essayé d'unmerge et d'emerge a nouveau avec comme var USE="mysql apache2"
toujours pareil...
Une solution ?
Merci d'avance. _________________ $this->setLife(FALSE);
printf "I'm not a gamer !";
Last edited by GaMeS on Sun Nov 13, 2005 5:55 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
netfab Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 03 Mar 2005 Posts: 1968 Location: 127.0.0.1
|
Posted: Sun Nov 13, 2005 5:22 pm Post subject: |
|
|
Salut,
Aucune garantie.
Essaye çà :
Quote: |
/etc/init.d/mysql stop
/etc/init.d/mysql zap
rm -rf /var/lib/mysql
emerge --config =mysql-VERSION
/etc/init.d/mysql start
|
En remplaçant VERSION par le numéro de version exact de mysql.
Last edited by netfab on Sun Nov 13, 2005 6:49 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GaMeS Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/193027462944673094b624f.jpg)
Joined: 08 Nov 2005 Posts: 374 Location: Nantes
|
Posted: Sun Nov 13, 2005 5:37 pm Post subject: |
|
|
J'ai pu rentré le mot de passe mais apparement il veux toujours pas me connecté a la base SQL...
Code: |
Configuring pkg...
* MySQL DATADIR is /var/lib/mysql
* Creating the mysql database and setting proper
* permissions on it...
* Insert a password for the mysql 'root' user
* Avoid ["'\_%] characters in the password
>
* Check the password
>
Installing all prepared tables
Fill help tables
....
|
pourtant je croyais que ça allais le faire. _________________ $this->setLife(FALSE);
printf "I'm not a gamer !";
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GaMeS Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/193027462944673094b624f.jpg)
Joined: 08 Nov 2005 Posts: 374 Location: Nantes
|
Posted: Sun Nov 13, 2005 5:54 pm Post subject: |
|
|
bon apparement ça a l'air de fonctionné
j'ai lancé via
Code: |
mysql -u root -p
antec ~ # mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.14-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show DATABASE;
|
Merci beaucoup ! _________________ $this->setLife(FALSE);
printf "I'm not a gamer !";
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
netfab Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 03 Mar 2005 Posts: 1968 Location: 127.0.0.1
|
Posted: Sun Nov 13, 2005 6:07 pm Post subject: |
|
|
Oui, il faut savoir que d'origine, et pour une raison qui m'échappe encore, il existe 2 utilisateurs root différents.
D'ailleurs je vais essayer de comprendre la différence.
Quote: | Two accounts are created with a username of root. These are superuser accounts that can do anything. The initial root account passwords are empty, so anyone can connect to the MySQL server as root without a password and be granted all privileges.
* On Windows, one root account is for connecting from the local host and the other allows connections from any host.
* On Unix, both root accounts are for connections from the local host. Connections must be made from the local host by specifying a hostname of localhost for one account, or the actual hostname or IP number for the other.
|
source
(là c'est la documentation pour la version 5.0, mais c'est la même chose pour les versions précédentes)
Edit : d'ailleurs, lorsque tu as effectué le emerge --config, c'est à ce moment que le password root t'as été demandé ? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GaMeS Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/193027462944673094b624f.jpg)
Joined: 08 Nov 2005 Posts: 374 Location: Nantes
|
Posted: Sun Nov 13, 2005 6:30 pm Post subject: |
|
|
oui tout a fais il m'a été demandé.
Bon je suis content ce 'Dimanche' m'a permis d'apprendre quelques trucs :p
et ensuite j'ai 2 utilisateurs root comme tu l'a dit mais avec des host différent : localhost && Antec _________________ $this->setLife(FALSE);
printf "I'm not a gamer !";
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|