Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: zach_fleming on August 18, 2004, 12:35:20 PM
-
I cannont log into phpmyadmin with root or admin.
cannot access any database's from php scripts in my websites.
cannot do, well pretty much anything with mysql.
is there something i need to do before i can use it with my own databases? or should it just work?
SPECS:
SME 5.6
P2 400MHZ
512MB
2x 10gb HDDs
2x Intel Pro100 NICs
-
Is that locally on the SME server or remote ?
Per default, MySQL accpets only connections locally on the server.
Here's what I do after a fresh install:
1. Enable remote access:
# /sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
# /sbin/e-smith/expand-template /etc/my.cnf
# /etc/rc.d/init.d/mysqld restart
2. Create new user to do my admin work in MySQL:
GRANT ALL ON * TO admin@localhost IDENTIFIED BY “password” WITH GRANT OPTION;
GRANT ALL ON * TO admin@”%” IDENTIFIED BY “password” WITH GRANT OPTION;
And finally, because I use PHP includes form y DB-connections located OUTSIDE the website tree, I do the following:
* Create directory php under /usr/share
* Chown admin php, chgrp shared php
* Put includes in /usr/share/php
* Chown admin *, chgrp shared * (from within /usr/share/php)
# mkdir /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
# cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/95AddType00PHP2ibays
* Change the line reading "php_admin_value open_basedir $basedir\n"; to "php_admin_value open_basedir $basedir:/usr/share/php\n";
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# apachectl restart
Hope this helps.
PS: I don't use phpMyAdmin myself. I work on the cmd line via PuTTY and I use MySQLFront an MySQL Control Centre.
PPS: It's amazing what you can find using the search function on this site :-D .
-
everything i do as far as my websites go is locally on my sme box so i'm asuming all i need to do is create a new user? or should i enable remote access as well?
-
Well the least you should do is create the appropriate user(s) and databases(s) on your system. And if everything happens locally, then you don't need to enable remote access and if you don't use inlcudes located outside your website tree then you also don't need to customize the configuration for that.
-
thanx for your help. i'm starting a new job tommorow so i dont think ill get much chance to have too much of a play with it for a week or so.
ill keep you informed all the same.
thank you for your help
regards
Zach