[ubuntu server] mysql werkt niet

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

  • Mr_gadget
  • Registratie: Juni 2004
  • Laatst online: 21:52

Mr_gadget

C8H10N4O2 powered

Topicstarter
Ik probeer al een tijdje mysql op ubuntu server werkend te krijgen. Ik heb eerst de standaard installatie guides gevolgd maar kennelijk is er ergens iets fout gegaan. ik heb al gezocht op de foutcodes en diverse methodes gevolgd maar omdat ik zelf af en toe niet 100% zeker weet wat ik doe ben ik bang dat ik het alleen maar erger maak. En het heeft tot nu toe niet geleid tot een oplossing.

Ik heb ook phpmyadmin geïnstalleerd maar als ik probeer in te loggen krijg ik volgende foutcode:
code:
1
 #1045 - Access denied for user: 'ubuntu@localhost' (Using password: YES)


Maar als ik het password dan wil wijzigen krijg ik dit:

code:
1
2
error: 'Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysqld.sock' exists!


wachtwoord checken wil ook niet
code:
1
2
3
4
 root@ubuntu:/var/lib/mysql/mysql# mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)
root@ubuntu:/var/lib/mysql/mysql#


dus ik doe: root@ubuntu: telnet localhost 3306
geeft:
code:
1
2
3
4
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
NHost 'localhost.localdomain' is not allowed to connect to this MySQL serverConnection closed by foreign host.


hij draait dus wel....

Iemand ideeën?

Acties:
  • 0 Henk 'm!

  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

Probeer het wachtwoord reset commando eens met als optie --protocol=TCP ? Zo te zien gaat hij uit van een socket die niet bestaat. Check daarnaast ook je my.cnf even wat staat er als pad bij 'socket = '?

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


Acties:
  • 0 Henk 'm!

  • Xenon
  • Registratie: Januari 2001
  • Laatst online: 21-08 09:12
Check eens de "bind-address" regel in je my.cnf file

Deze kan je best gewoon commenten

ProtocoLAN.be: De beste LAN van de Maaskant


Acties:
  • 0 Henk 'm!

  • Mr_gadget
  • Registratie: Juni 2004
  • Laatst online: 21:52

Mr_gadget

C8H10N4O2 powered

Topicstarter
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
 #
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "/var/lib/mysql/my.cnf" to set server-specific options or
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port            = 3306
socket          = /tmp/mysqld.sock

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0

[mysqld]
#
# * Basic Settings
#
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /tmp/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
language        = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
# bind-address            = 127.0.0.1
#
# * Fine Tuning
#
key_buffer              = 16M
max_allowed_packet      = 16M
thread_stack            = 128K
#
# * Query Cache Configuration
#
query_cache_limit       = 1048576
query_cache_size        = 16777216
query_cache_type        = 1
#
-- INSERT --


commenten werkte helaas niet en het commando:
code:
1
2
3
 root@ubuntu:/home/ubuntu# mysql -u root -p  --protocol=TCP
mysqladmin: unknown variable 'protocol=TCP'
root@ubuntu:/home/ubuntu#

doet het dus ook niet...of geef ik het verkeerde commando?
of dit:
code:
1
2
3
4
5
6
 root@ubuntu:/home/ubuntu# mysqladmin -u root -p password
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysqld.sock' exists!
root@ubuntu:/home/ubuntu#

Acties:
  • 0 Henk 'm!

  • Spider.007
  • Registratie: December 2000
  • Niet online

Spider.007

* Tetragrammaton

Geef eens de output van `ps -eaf|grep mysql` en `ls -l /tmp/mysqld.sock`? Hij lijkt namelijk echt niet te draaien :?

---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate


Acties:
  • 0 Henk 'm!

Verwijderd

waarschijnlijk heb je enkel rechten voor 'root'@'localhost' en niet voor 'root'@'localhost.localdomain'

Je kan een keer starten met de --skip-grant-tables optie om dan de root rechten goed te zetten.

"mysql --print-defaults" Laat de default waardes zien. Bij mij staat de socket file ergens in /var en niet in /tmp, zorg dat de client en server dezelfde socket file gebruiken.

Onthoud dat er verschil zit tussen mysql, mysqladmin en mysql-admin....

vergeet niet om het mysql_secure_installation script te draaien om anonymous accounts te disablen en om het root account van een password te voorzien

[ Voor 21% gewijzigd door Verwijderd op 12-06-2006 08:45 ]


Acties:
  • 0 Henk 'm!

  • Mr_gadget
  • Registratie: Juni 2004
  • Laatst online: 21:52

Mr_gadget

C8H10N4O2 powered

Topicstarter
code:
1
2
3
4
5
 ubuntu@ubuntu:~$ ps -eaf|grep mysql
root      5480     1  0 15:14 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
root      5516  5480  0 15:14 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     5517  5516  0 15:14 ?        00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
root      5518  5516  0 15:14 ?        00:00:00 logger -p daemon.err -t mysqld_safe -i -t mysqld


code:
1
2
ubuntu@ubuntu:~$ ls -l /tmp/mysqld.sock
ls: /tmp/mysqld.sock: Onbekend bestand of map


ik heb de socket instellingen nu verandert naar /var/run/mysqld/mysqld.sock en dat heeft geloof ik wel gewerkt. Alleen het password nog resetten...

Ik geloof dat nu werkt! Kan nu als root inloggen op phpmyadmin!
Dank u! :)
Pagina: 1