I use command: mysql --help --verbose
It output the following directories and filenames:
- Default options are read from the following files in the given order:
-
C:\Windows\my.ini
-
C:\Windows\my.cnf
-
C:\my.ini
-
C:\my.cnf
-
c:\bitnami\wampstack-5.4.36-0\mysql\my.ini
-
c:\bitnami\wampstack-5.4.36-0\mysql\my.cnf
I could not find:
C:\my.ini
C:\my.cnf
C:\Windows\my.ini
C:\Windows\my.cnf
c:\bitnami\wampstack-5.4.36-0\mysql\my.cnf
I found only
c:\bitnami\wampstack-5.4.36-0\mysql\my.ini
which does not contain password option. The contents without most of comments:
-
[mysqldump]
-
max_allowed_packet=16M
-
-
[isamchk]
-
key_buffer_size=20M
-
sort_buffer_size=20M
-
read_buffer=2M
-
write_buffer=2M
-
-
[myisamchk]
-
key_buffer_size=20M
-
sort_buffer_size=20M
-
read_buffer=2M
-
write_buffer=2M
-
-
[mysqlhotcopy]
-
-
[mysqladmin]
-
user=root
-
port=3306
-
# set basedir to your installation path
-
basedir=C:/Bitnami/WAMPST~1.36-/mysql
-
# set datadir to the location of your data directory
-
datadir=C:/Bitnami/WAMPST~1.36-/mysql\data
-
port=3306
-
#skip-locking
-
key_buffer_size=16M
-
max_allowed_packet=16M
-
table_cache=64
-
sort_buffer_size=512K
-
net_buffer_length=8K
-
read_buffer_size=256K
-
read_rnd_buffer_size=512K
-
myisam_sort_buffer_size=8M
-
bind-address=127.0.0.1
-
-
Finally i have added line to
c:\bitnami\wampstack-5.4.36-0\mysql\my.ini
I have tried several combinations, restarting MySQL server each time i make change:
password="some"
password='some'
password=some
password=none
password=""
password=''
I check if this works by command
mysql -u root -p
But i am still getting error "ERROR 1045 (28000): Access denied for user 'root'@'localhost'".
I also tried command:
mysql -u root -p "some"
(with "", '' and without quotes), but it outputs help.
According
http://www.cyberciti.biz/faq/mysql-c...root-password/
This command works only for the first time. If password already exists somewhere, this command is not working.
According,
http://www.cyberciti.biz/tips/recove...-password.html -
(1) Stop the server: /etc/init.d/mysql stop
-
(2) Start the mysql daemon: # mysqld_safe –skip-grant-tables
-
(3)* While its running, open another terminal and login to mysql
-
# mysql -u root (hit enter)
-
(4) Now you are logged in.
-
mysql>use mysql;
-
mysql>update user set password=PASSWORD(“YOUR_NEW_PASS”) where User=’root';
-
you should see the output: Query ok etc.
-
mysql>flush privileges;
-
mysql>quit
-
(5) stop the server: /etc/init.d/mysql stop
-
(6) *Confirm that no mysql processes are still running (in my case they were and made the server fail to start). To check this: run this
-
ps ax | grep mysql
-
Now kill the process IDs of any mysql still running in the background using kill PID
-
e.g. kill 4425. Do not use kill -9 as this may crash the database entirely!!
-
Confirm no mysql process is still running: ps ax | grep mysql
-
(7) Then start the server: /etc/init.d/mysql start
-
(8) login with your new password: mysql -u root -p
But in my case, seems mysqld is not working.
I have found
C:\Bitnami\wampstack-5.4.36-0\mysql\bin\mysqld.exe
Using command: mysqld --verbose --help
outputs range of commands "–skip-grant-tables" including, but there is a notice FALSE on the same line.
I stop mysql server from WINAMP options window, than i run: mysqld –skip-grant-tables
than i open another termnal and try to login using: mysql -u root
I am getting "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"
How to configure(set) password for root in mysql?
Should i create *.cnf file?
Actually the main problem is that i can not create tables in Symfony. Most probably symfony use "C:\Bitnami\wampstack-5.4.36-0\sym_prog\myproject\app\config\parameters.yml" parameters and overwrites mysql settings? But it can not overwrite because it tries to overwrite the wrong file, which does not exists?