Pharaoh Posted April 30, 2008 Share Posted April 30, 2008 What boggles me is I can log in with a user/pass through MySql Administrator yet with the same user pass I've tested on several php scripts I get, #1045 - Access denied for user 'xxxxxxxx'@'localhost' (using password: YES) including a fresh install of phpMyAdmin and my transferred Postnuke community from a different server. I've made a couple of simple test query scripts to access the database but MySql won't let PHP login... or PHP is fuddeling up the login... any ideas? I've tried creating new users with all privelages and can connect remotely with MySql Admin but local php connections won't go, just set up a new dedicated server and am new at doing this myself without the aid of WHM/Cpanel. I got a gut feeling it's on the PHP end of things... but not sure [code] [/code]CentOS 5 PHP Version 5.1.6 MySql 5.0.22 Apache 2.2.3 php info () file says Configure Command './configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 5.0.22 MYSQL_MODULE_TYPE external MYSQL_SOCKET /var/lib/mysql/mysql.sock MYSQL_INCLUDE -I/usr/include/mysql MYSQL_LIBS -L/usr/lib/mysql -lmysqlclient Directive Local Value Master Value mysql.allow_persistent On On mysql.connect_timeout 60 60 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off Does --without-mysql mean anything? Quote Link to comment https://forums.phpfreaks.com/topic/103521-mysql-connection-problems-in-php-scripts/ Share on other sites More sharing options...
trq Posted April 30, 2008 Share Posted April 30, 2008 Does --without-mysql mean anything? Of course. It meens exactly what it says. Your version of php is not compile with support for mysql. Support for mysql is no longer compiled into php by default because of licensing issues. However, your error message contradicts this message. If your version of php truely doesn't support mysql you will get a call to undefined function when trying to call mysql_connect(). Can we see some code where you attempt to make a connection? Quote Link to comment https://forums.phpfreaks.com/topic/103521-mysql-connection-problems-in-php-scripts/#findComment-530120 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.