[mysql] error 1044; access denied for user

Pagina: 1
Acties:
  • 624 views sinds 30-01-2008

Acties:
  • 0 Henk 'm!

  • Haranaka
  • Registratie: September 2000
  • Laatst online: 08-09 09:36
Ik dacht iop deze zondag eens wat te kloten in mysql. Maar zover kwam ik zelf niet eens. Als ik een database wil aanmaken zegt hij:

ERROR 1044: Acces denied for user: '@localhost' to database 'bla'

...


Acties:
  • 0 Henk 'm!

  • Haranaka
  • Registratie: September 2000
  • Laatst online: 08-09 09:36
Als ik als het onder root doe doet hij het wel...
Hoe krijg ik het voorelkaar dat ik het met mijn gewone user kan doen?

...


Acties:
  • 0 Henk 'm!

Verwijderd

mysql --user=root -p
<vul je root wachtwoord in>
mysql> GRANT ALL PRIVILEGES ON bla.* TO haranaka@localhost IDENTIFIED BY 'eenwachtwoord' WITH GRANT OPTION;

Dit geeft de user haranaka alle rechten voor de database 'bla' als hij het password 'eenwachtwoord' geeft, vanaf de localhost..

Acties:
  • 0 Henk 'm!

  • RemcoX
  • Registratie: Mei 2000
  • Laatst online: 10-08 15:30
Op zondag 06 januari 2002 18:08 schreef sharpe het volgende:
Dit geeft de user haranaka alle rechten voor de database 'bla' als hij het password 'eenwachtwoord' geeft, vanaf de localhost..
De topicstarter wil blijkbaar een user de rechten geven om een database aan te maken, en niet om binnen die database vanalles te doen. En dat kan na jouw GRANT regel nog steeds niet.

Probeer dit eens:
code:
1
2
USE mysql
UPDATE user SET Create_priv = "Y" WHERE User = "haranka";

Acties:
  • 0 Henk 'm!

Verwijderd

o nee?
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
rob@relativity:/home/rob$ mysql --user=root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 313 to server version: 3.23.46-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL PRIVILEGES on bla.* TO sharpe@localhost IDENTIFIED BY 'test' WITH GRANT OPTION;
Query OK, 0 rows affected (0.42 sec)
mysql> exit
Bye

rob@relativity:/home/rob$ mysql --user=sharpe -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 314 to server version: 3.23.46-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database bla;
Query OK, 1 row affected (0.02 sec)

;)

Acties:
  • 0 Henk 'm!

  • RemcoX
  • Registratie: Mei 2000
  • Laatst online: 10-08 15:30
Op zondag 06 januari 2002 19:17 schreef sharpe het volgende:
o nee?
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
rob@relativity:/home/rob$ mysql --user=root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 313 to server version: 3.23.46-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> GRANT ALL PRIVILEGES on bla.* TO sharpe@localhost IDENTIFIED BY 'test' WITH GRANT OPTION;
Query OK, 0 rows affected (0.42 sec)
mysql> exit
Bye

rob@relativity:/home/rob$ mysql --user=sharpe -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 314 to server version: 3.23.46-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database bla;
Query OK, 1 row affected (0.02 sec)

;)
Dat lijkt me niet de bedoeling :)

Acties:
  • 0 Henk 'm!

  • Snow_King
  • Registratie: April 2001
  • Laatst online: 22:58

Snow_King

Konijn is stoer!

gebruik phpMyAdmin kan je heel easy users aanmaken :)

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
Ik greeg na de install van mysql de opdracht van verander even het root password us ik met de regel die gegeven was als root proberen.

/usr/bin/mysqladmin -u root -p password 'new-password'

En krijg steeds de onderstaande error's. Wie kan mij helpen om het wachtwoord te veranderen.
code:
1
2
3
4
5
6
7
8
9
10
11
12
[root@firewall bin]# /usr/bin/mysqladmin -u root -p password 'new-password'
Enter password: 
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
[root@firewall bin]# /usr/bin/mysqladmin -u root -p password 'new-password'
Enter password: 
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
[root@firewall bin]# mysql --user=root -p
Enter password: 
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
[root@firewall bin]#

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
Nog niemand antwoord, jammer want ik kom nu niet verder.

Acties:
  • 0 Henk 'm!

  • 2P
  • Registratie: November 2001
  • Laatst online: 28-05 14:22

2P

:wq

code:
1
2
3
root@obelix:~# mysqladmin -u root -p password blaat
Enter password:
root@obelix:~#

zie hierboven.
k heb mysqld net geinstalleerd ;)

'blaat' is daar dan me password.
als mysqladmin om een password vraagt dan druk ik gewoon enter.

op deze manier kan je je password ook veranderen.
je moet dan natuurlijk wel je ouwe password opgeven als mysqladmin daar om vraagt.

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
Nou ik wil gewoon dat hij om een password vraagt en dat ik een password moet opgeven. Kan nu wel gewoon doorlopen dor op enter te drukken alleen dat wil ik niet. Wat doe ik nu verkeerd ??

Acties:
  • 0 Henk 'm!

  • RemcoX
  • Registratie: Mei 2000
  • Laatst online: 10-08 15:30
code:
1
2
3
USE mysql;
UPDATE user SET Password = PASSWORD("blaat") WHERE User = "root";
FLUSH PRIVILEGES;

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
Op maandag 18 maart 2002 08:33 schreef RemcoX het volgende:
code:
1
2
3
USE mysql;
UPDATE user SET Password = PASSWORD("blaat") WHERE User = "root";
FLUSH PRIVILEGES;
Na wat geklooi is het gelukt met de bovenstaande code, alleen heb ik dit uit gevoert:

mysql -h firewall -u root -p
enter
mysql> UPDATE user
-> SET Password = PASSWORD("blaat") WHERE User = "root";
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.02 sec)

Alleen als ik nu het password voor de root wil wijzigen dan krijg ik weer error's terwijl ik wel aan root onder mysql ben ingelogt met het password blaat.

Ook krijg is deze error als ik een password voor een andere gebruiker wil aan maken.

ERROR 1131: You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords

Waar aan kan dit bovenstaande liggen ?

Acties:
  • 0 Henk 'm!

  • RemcoX
  • Registratie: Mei 2000
  • Laatst online: 10-08 15:30
Op maandag 18 maart 2002 08:48 schreef Neptunus het volgende:

Na wat geklooi is het gelukt met de bovenstaande code, alleen heb ik dit uit gevoert:
Geklooi? Je hebt gewoon exact die code overgenomen, en dat werkt >:)
Alleen als ik nu het password voor de root wil wijzigen dan krijg ik weer error's terwijl ik wel aan root onder mysql ben ingelogt met het password blaat.
Paste eens hoe je dat precies doet, en welke errors je krijgt.

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
code:
1
2
3
4
5
6
7
8
9
10
[root@firewall root]# mysql -h firewall -u roy -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 46 to server version: 3.23.49a

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SET Password = PASSWORD("blaat") WHERE User = "roy";
ERROR 1131: You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords
mysql>

OP de bovenstaande manier heb ik het gedaan, wat is het probleem is de vraag :9 .

Acties:
  • 0 Henk 'm!

  • RemcoX
  • Registratie: Mei 2000
  • Laatst online: 10-08 15:30
Op maandag 18 maart 2002 15:56 schreef Neptunus het volgende:

[...]

OP de bovenstaande manier heb ik het gedaan, wat is het probleem is de vraag :9 .
Je moet ook als root de passwords aanpassen. Alleen root heeft (standaard) UPDATE rechten in mysql.*

Trouwens, ik neem aan dat je het wachtwoord voor de gelegenheid veranderd hebt? >:)

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
Dus eerst als root inloggen en dan SET Password = PASSWORD("blaat") WHERE User = "roy";

enz ??

Acties:
  • 0 Henk 'm!

  • RemcoX
  • Registratie: Mei 2000
  • Laatst online: 10-08 15:30
Op maandag 18 maart 2002 16:05 schreef Neptunus het volgende:
Dus eerst als root inloggen en dan SET Password = PASSWORD("blaat") WHERE User = "roy";

enz ??
Eerst als root inloggen, en dan intypen zoals ik heb beschreven in een vorige post.

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
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
<?php
/* $Id: config.inc.php,v 1.73 2002/03/09 12:36:30 loic1 Exp $ */
 
/**
 * phpMyAdmin Configuration File
 *
 * All directives are explained in Documentation.html
 */
   
/**
 * Bookmark Table Structure
 * 
 * CREATE TABLE bookmark (
 *  id int(11) DEFAULT '0' NOT NULL auto_increment,
 *  dbase varchar(255) NOT NULL,
 *  user varchar(255) NOT NULL,
 *  label varchar(255) NOT NULL,                 
 *  query text NOT NULL,
 *  PRIMARY KEY (id)
 * );
 *
 */

/**
 * Your phpMyAdmin url
 *
 * Complete the variable below with the full url ie
 *    http://www.your_web.net/path_to_your_phpMyAdmin_directory/
 */
$cfgPmaAbsoluteUri = 'http://212.120.102.230:8888/php/phpMyAdmin-2.2/ ';

/**
 * Server(s) configuration
 */
// The $cfgServers array starts with $cfgServers[1].  Do not use $cfgServers[0].
// You can disable a server config entry by setting host to ''.
$cfgServers[1]['host']      = 'firewall';    // MySQL hostname
$cfgServers[1]['port']      = '8888 ';      // MySQL port - leave blank for default port
$cfgServers[1]['socket']      = '';     // Path to the socket - leave blank for default socket
$cfgServers[1]['connect_type']  = 'tcp';     // How to connect to MySQL server ('tcp' or 'socket')
$cfgServers[1]['controluser']   = 'roy';        // MySQL control user settings
                                    // (this user must have read-only
$cfgServers[1]['controlpass']   = ' ';        // access to the "mysql/user"
                                    // and "mysql/db" tables)
$cfgServers[1]['auth_type']     = 'config';     // Authentication method (config, http or cookie based)?
$cfgServers[1]['user']      = 'root';         // MySQL user
$cfgServers[1]['password']  = 'blaat';      // MySQL password (only needed
                                     // with 'config' auth_type)
$cfgServers[1]['only_db']    = '';      // If set to a db-name, only
                                 // this db is displayed
                                 // at left frame
                                 // It may also be an array
                                 // of db-names
$cfgServers[1]['verbose']    = '';      // Verbose name for this host - leave blank to show the hostname
$cfgServers[1]['bookmarkdb']    = '';       // Bookmark db - leave blank for no bookmark support
$cfgServers[1]['bookmarktable'] = '';       // Bookmark table - leave blank for no bookmark support  
$cfgServers[1]['relation']  = '';       // table to describe the relation between links (see doc)
                                 //   - leave blank for no relation-links support

Ik krijg met phpMyadmin steeds deze error:
Parse error: parse error in /home/private/www/public_html/php/phpMyAdmin-2.2/config.inc.php on line 43

Ik draai php 4.0.6 en dat draait prima heb er andere php script goed mee aan het werk.

De error dir ik krijg zit volgens mij in deze regel:
$cfgServers[1]['socket'] = ''; // Path to the socket - leave blank for default socket

Zouden jullie een kunnen kijken wat er in mijn config fout is??

Acties:
  • 0 Henk 'm!

  • RemcoX
  • Registratie: Mei 2000
  • Laatst online: 10-08 15:30
Haal die regelovergang op de regel ervoor eens weg, dus zodat de regel beginnend met 'blank for' niet op een nieuwe regel begint.

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
In de config file was er inderdaad een enter die fout stond (nu niet meer en geen eroor meer)! Ik krijg nu alleen kan de MySQL extensie niet laden,
controleer de PHP configuratie.

Wie help mij van het probleem af ??

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
Moet ik mySQl nog samen voegen met PHP of zo omdat ik dat mysql later geinstald heb??

Acties:
  • 0 Henk 'm!

  • RdeTuinman
  • Registratie: Mei 2001
  • Laatst online: 03-08 05:41
Ja, PHP moet opnieuw geconfigureerd worden om MySQL te ondersteunen. Typ ./configure --help voor de opties.

Er moet zoiets als --with-mysql=[DIR] toegevoegd worden.

Acties:
  • 0 Henk 'm!

  • Neptunus
  • Registratie: Januari 2001
  • Laatst online: 23-06 16:04
Zou je een voorbeeld kunnen plaatsen van de httpd.conf?? Ik moet zeggen heb ook nog net gezocht hoor kan ik vannavond ook nog wel even doen, ik meot nu alleen naar school. Ik kijk vannavond wel even of hier nog meer info gepost is.

  • MonkeyBrain
  • Registratie: Februari 2021
  • Laatst online: 25-02-2021
We zijn bijna 20 jaar verder en dit probleem is nog te moeilijk voor onze simpele breinen 8)7

  • Cyphax
  • Registratie: November 2000
  • Laatst online: 22:35

Cyphax

Moderator LNX
Dat is een wel erg nutteloze kick. Als je een probleem hebt wat hierop lijkt, open dan een nieuw topic. :P

Saved by the buoyancy of citrus

Pagina: 1

Dit topic is gesloten.