ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

If someone can tell me where i am missing the boat on this Mysql script?

<< < (2/2)

Hi questorfla,

I did few work on MS and My Sql for some odd project. I had one database without password and was having trouble to login into the database from the script code. I could login from the Admin console.

Then I added a password to the database and used it in the script. Everything works OK now.

Looks like the password is needed from the script or there is some other way to send the blank password which I do not know. Anyway I hope my experience may show some light to you.



I would bet you are correct.  Adding a password to the MySQL access for root may be the best way.  This is something that in my opinion SHOULD be there anyway but the people who wrote the original script recommended that I leave it blank.

I do not know why but always have done as they said.  Not having a PW and trying to connect through a script sounds very likely though and I will know in just about 10 minutes as I skipped that part and went on with the rest. 
I am now ready to compile and the only holdup is the darned DB.

That and I am not sure about the correct method of continuing the operation of what is now a PHP script normally accessed via web that I will be finishing inside the batch if possible.  This is all part of a long drawn out install procedure for a tiny website

OK Solved.
No password needed but location when runing the command is essential.  I tried this using a "fake" location for %main% and it failed.

--- Code: Text ---set db=joeset main = (this variable must be the full path to the databases normal location I think )cd %main%mysql -u root  -e "CREATE DATABASE IF NOT EXISTS %db%";
This returned no errors and checking with PhpMyAdmin showed a nice MySql DB empty and waiting to be loaded.

Thanks for the help. and maybe this will be of some use to someone one day.


[0] Message Index

[*] Previous page

Go to full version