Asked by duncanb7
at 2024-08-15 04:07:01
Point:500 Replies:10 POST_ID:828748USER_ID:11059
Topic:
PHP Scripting Language;Linux;MySQL Server
I go to root mysql like this
mysql>Show databasese
------------------
Database
-----------------
memberlist
phonelist
wordpress-wp
------------------
So there are three databases, First two databases that is okay which
I used phpmyadmin in Cpanel to create them and I can access those two database
by the following php code but fail on database of "wordpress-wp";
Now I expired Cpanel , so I could not use CPanel any more, so I need to use shell command to create my wordpress-wp that is okay & I can access & use it on wordpress software .
But when I try access the database of wordpress-wp using following php
cod ing , that is not working even I already grant access right for my user account
on wordpress-wp, I can not pass the mysql_select_db("wordpress-wp"), Why ?
So I go recheck again at mysql with command Show Grants for myloginname
that also show I have right on the database , wordpress-wp
Now I can see my database is there at /var/lib/mysql but my.cnf file is emtry
at /etc/ so, could you also tell where is mysql config setup file in which
I can see mysql will go to locate the database to /var/lib/mysql ?
Pleae advise, and mysql_connect is no issue at all and I can access wordpress-wp at
linux shell and passed "use wordpress-wp" & "Select * from wp_posts where 1"
I guess that is related path redirect or alias issue on linux , and actual mysql
database path might Not be at /var/lib/mysql but I could NOt find out the solution
of this thread
Duncan
mysql>Show databasese
------------------
Database
-----------------
memberlist
phonelist
wordpress-wp
------------------
So there are three databases, First two databases that is okay which
I used phpmyadmin in Cpanel to create them and I can access those two database
by the following php code but fail on database of "wordpress-wp";
Now I expired Cpanel , so I could not use CPanel any more, so I need to use shell command to create my wordpress-wp that is okay & I can access & use it on wordpress software .
But when I try access the database of wordpress-wp using following php
cod ing , that is not working even I already grant access right for my user account
on wordpress-wp, I can not pass the mysql_select_db("wordpress-wp"), Why ?
So I go recheck again at mysql with command Show Grants for myloginname
that also show I have right on the database , wordpress-wp
Now I can see my database is there at /var/lib/mysql but my.cnf file is emtry
at /etc/ so, could you also tell where is mysql config setup file in which
I can see mysql will go to locate the database to /var/lib/mysql ?
Pleae advise, and mysql_connect is no issue at all and I can access wordpress-wp at
linux shell and passed "use wordpress-wp" & "Select * from wp_posts where 1"
I guess that is related path redirect or alias issue on linux , and actual mysql
database path might Not be at /var/lib/mysql but I could NOt find out the solution
of this thread
Duncan
?>"