Unable To Access MySQL From Apache2+PHP4
this is the first time I (try) to set up my own webserver. Installing/configuring Apache2 went fairly well with some help, and PHP4 too. But the problem now is that I don't really know how to use MySQL. I mean, I know some easy SQL stuff, but I don't know much about installing such a server program.
I've searched the forums, and found this post.
Well, I got a page in the htdocs dir which shows a listing of PHP statistics (with the phpinfo() command). I've added a screenshot of the MySQL stats which this page shows, with this post.
So then I tried the following step which Mr. Oshikorosu explained, I copied his script and put it in a file. However, I already have a password setup for my root account, so I changed this: $password="mypassword";.
Then when I accessed that page, I got this error: Error 1045: Access denied for user 'ODBC'@'localhost' (using password: NO).
What did I do wrong and what do I have to do to be able to use the MySQL function with PHP4? I tried reading this doc from the PHP Manual, but I don't really understand it and also, the php.ini file says that my version on windows automatically supports MySQL ??
I'm running all these progs on Windows XP Pro btw.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Unable To Access Mysql On Network
We have one PC running xampp with a website on. that's working fine. however, when we go to another computer on the network and try to access the site, it cannot connect to mysql. eg: 192.168.5.101 is the machine running the site. (everything works fine) when accessing 192.168.5.101/site/ from another machine, the static HTML pages come over fine, but when we try to access a page using a mysql connection (PHP) we get an error. Access denied for user ODBC@localhost. the PHP method we use to connect is mysql_connect("localhost","root","")
Connect Php4 And Mysql
I've programmed couple of files in php but when I'm trying to open them, using http://localhost/ then I get this error: Fatal error: Call to undefined function: mysql_pconnect() in /var/www/addressbook/add.php on line 19 In Line 19 I'm trying to connect to mysql using the pconnect function. I've searched alot via google to try to find this solution and thing my problem is that my PHP4 doesn't support mysql and all the answers I'v found are related to if I installed PHP4 using *.tar file. But I used apt to install the whole thing so I've no idea how to add this mysql support to PHP4.
PHP + MySQL On Apache2
I just made a server out of one of my old computers. I installed Apache2 and the latest versions of PHP and MySQL. Now, the server is working great, I can run PHP scripts like I want and I can use shell access to connect to the database. I even managed to create a new database. BUT, when I try to use PHP to connect to my database everything doesn't work so good anymore. I tried to install phpMyAdmin but that complained before I even got to the settings. Now I'm trying to install phpBB 2, something I've installed many times before on other servers. When I run the install script I get "The PHP configuration on your server doesn't support the database type that you chose". I've found a few things about this here and there but nothing I've tried so far has worked out.
PHP4: How To Upgrade MySQL Client To V4?
Clean install of: PHP 4.4.2 MySQL 4.1.21 Problem: phpinfo() shows the MySQL client to be 3.23.49. I want my dev environment to match my hosts, so upgrading to PHP5 and/or MySQL5 is not an option. So how do I upgrade the MySQL client in PHP to 4.x? I tried the MySQL PHP connector page ( http://dev.mysql.com/downloads/connector/php/ ) , but it only lists downloads for PHP5. (which I tried anyway, but can't get to work)
Local MySQL DB With PHP And Apache2
this is the environment: Windows XP Professional V2002 SP2 Apache Server 2.0.54 PHP 5.0.5 MySQL 4.0.21. All applications are working as such (Apache, PHP and MySQL DB), but when I try to connect to the DB, nothing happens (not even an error). I was reading around a bit and tried some stuff. Eventually I found some things I haven't done): #### went into php.ini and inserted the path of the apache document root path into the doc_root field in addition inserted the extensions dir path to the extension_dir field in php.ini, which was c:phpext scrolled down to almost the bottom of the php.ini file and deleted the 'comment' character to activate the php_mysql.dll extension. ### Now, I did this, but when I restart the Apache Server I get two error messages: PHP Startup: Unable to load dynamic library 'C:phpextphp_mysql.dll' - The specified module could not be found. This does not make sense, because the dll IS in that folder. I even reinstalled PHP and reconfigured the ini-File. Nothing. And it really, really, REALLY am getting annoyed here (yes, I tried forward slashes).
Debian With Apache, Php4, Mysql And Phpmyadmin
i've installed phpmyadmin today on my server. My server is working like a charm, so i write http://localhost/phpmyadmin in konqueror and it shows the index page of phpmyadmin. I type my username (root) and my password. But it shows me back the index page with errors. Here are the errors. Warning: Cannot add header information - headers already sent by (output started at /etc/phpmyadmin/config.inc.php:265) in /usr/share/phpmyadmin/libraries/auth/cookie.auth.lib.php on line 353 Warning: Cannot add header information - headers already sent by (output started at /etc/phpmyadmin/config.inc.php:265) in /usr/share/phpmyadmin/libraries/auth/cookie.auth.lib.php on line 355 Warning: Cannot add header information - headers already sent by (output started at /etc/phpmyadmin/config.inc.php:265) in /usr/share/phpmyadmin/libraries/auth/cookie.auth.lib.php on line 372 I've heard about something that could be wrong with my encoding, i choosed 8859-1 when i installed my system. I've used tasksel so it installed postgresql, mysql never asked me about encoding. But it could be something else ?
MySQL Running In Linux With Apache2
I have Fedora Linux running on my box. I have installed Apache2, PHP, MySQL. I used YUM to install everything. yum install httpd yum install php yum install mysql-server mysql yum instal php-mysql What I want to know is that how can I start playing around with all this cool programs. I want to learn as much about all these awesome programs. I would like to install some kind of control center for MySQL. I heard MyPHPadmin is good. But how do I install it? Can I do it through yum? Where can I find a good newbie guide? thanks in advance :-) Fedora Project Information is Power! I am doing this for the love of MySQL.
V. 4.1.7 + Php4 Works, + Php5 Problems
I am running: Mac OS X 10.3.7 apache 2.0.52 MySQL 4.1.7 php 4.9.3 & php 5.0.3 I have an html form that "POST"s data to a db. I have a "GET" script to repopulate form for editing. Everything works fine with php 4.9.3. With php5.0.3 the data is "POST"ed just fine (I used a different GUI app to check) When I try to "GET" said data, form is returned empty? I have all error reporting turned on = nothing. I have all backwards-compatibility directives in php.ini config file turned on.
Mysql5 Setup Php5, Apache2
Trying to setup mysql5 to run with apache 2 and php5 and having very little luck. I've followed instructions from many sites and yet it still isn't being recognised when using the php functions to connect to the db. mysql runs fine on it's own as I've been using it. I've downloaded the *.dlls from mysql and installed them in the correct dir's, uncommented the mysql dll in php.ini and restarted apache.
Installing Mysql5 (winXP, Apache2, Php5)
Using window XP. I install Apache_2.0.55, PHP 5.1.2 installer. After testing, server can run with php codes properly. However, How to install mysql5 and combine with Apache3+php5?? Where should i choose for install path way?? Should i choose C:Apache2 ??? I decide to install mysql-essential-5.0.18-win32.msi and the path way is C:mysql finish installation..... How can i start mysql5??? directly double-click mysql.exe => a "bee" sound heard and the file self -close immediately. I try to click other exe diles and all of them self-close immediately. Code:
Unable To Connect To MySQL
I am using the following statement to connect to MySQL using PHP on Windows 2000. $connect = mysql_connect("localhost", "root", "azbycx") or die (mysql_error()); Unfortunately I get the following error. Warning: mysql_connect() [function.mysql-connect.chm]: Can't connect to MySQL server on 'localhost' (10061) in D:xyzphptest.php on line 3 Can't connect to MySQL server on 'localhost' (10061) I can connect to and manipulate MySQL via the command prompt without problem. Does anybody have any idea what I should be looking at ?
Unable To Start Mysql
I installed the binary version of MySQL 3.23.49 in debian 3.0 . When i try to start by giving ./bin/safe_mysqld the mysqld ends & the following message is found in the error file in the data directory Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!
Unable To Jump To Row 0 On MySQL
I have got a Php remote application that worked perfectly with mySQL DB. I putted, truough this application, many many rows in DB but now, when I try with another application's instance to access DB rows, only some of them comes visible, for the other ones i read "Unable to jump to row 0 on MySQL result index ... in ..." (after in, I got the URI for the Query function php file).
Unable To Start MySQL
My server FC4 was unable to start MySQL. I have tried to use yum to remove and install MySQL several times. How can I solve this problem? Hope someone can give me a hand. # service mysqld start Timeout error occurred trying to start MySQL Daemon. Starting MySQL: [FAILED] # # # service mysqld status mysqld dead but subsys locked tikual
Unable To Make DBD::mysql On HP-UX
I am getting errors while compiling DBD-mysql 2.9002 on HP-UX 11.00 I have perl 5.8 downloaded from HP depot installed at /opt/perl Mysql 4.0.13 compiled myself with gcc with Mysql recommended options and working fine I am getting this error ..... Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.sl LD_RUN_PATH="/usr/local/mysql/lib/mysql:/usr/local/lib:/lib" /opt/perl/bin/perl myld gcc -shared -static-libgcc -fPIC dbimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.sl -L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm gmake: *** [blib/arch/auto/DBD/mysql/mysql.sl] Error 1 How can I fix this ?, any tips?
Unable To Run Mysql On Windows98se
I am trying to set the username and password after installing mysql 5, I run an ms dos prompt, and type in mysqld but am met with an error msg: C:Program FilesMySQLMySQL Server 5.0in>mysqld~2 061026 10:09:20 [ERROR] Can't find messagefile 'C:Program FilesMySQLMySQL Ser ver 5.0shareenglisherrmsg.sys' 061026 10:09:20 [ERROR] Aborting I checked the above folder and there is an errmsg.sys file, does anyone know.
Unable To Connect To Mysql
I am trying to connect to a new mysql installation. I have given root permission to connect to all databases from anywhere; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'passwd' WITH GRANT OPTION; I can log on locally by specifying the host name: [me@au101 me]$ mysql -h 127.0.0.1 -u root -p test Enter password: Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 2 to server version: 5.0.18-standard However, when I try to log in locally without specifying the host name I receive the following error: [me@au101 me]$ mysql -u root -p mysql Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) If I try to connect remotely as root using MySQLyog I receive a similar error message: Access denied for user root@[my ip
Unable To Start MySQL
I'm loosing my mind here.I'm new to Linux and I'm trying to get MySQL to start on the machine. I installed MySQL by using YAST and the following is what I get: linux-dell-8200:/home/rob.hazle # service mysql status Checking for service MySQL: unused linux-dell-8200:/home/rob.hazle # service mysql start Starting service MySQL failed
Unable To Start MySQL
I have just installed, PHP, Apache, on my WinXP Pro machine. I then went to install MySQL, which appeared to go well... I went into MySQL folder and opened up winmysqladmin, and clicked on Start...the response I got was unable to start try again in 30 seconds... Don;t know if this has anything to do with it, but in the books and help pages I have got, they all mention a log on page, to enter username and password, I have not seen this.
Unable To Create Database In Mysql
I use Macos 10.4.7 When I write "CREATE DATABASE books" I get this message: ERROR 1044 (42000): Access denied for user :'@4localhost' to database 'books' Why can't I create database?
Unable To Connect To Mysql Server
i have problem om my sevrer ( linux ) WHM 11.11.0 cPanel 11.16.0-S18450 REDHAT Enterprise 4 i686 on standard - WHM X v3.1.0 after update apache then all websites on server can not connect mysql from WHM > Tweak Settings > Mysql > 5.0 and used old style (4.0) passwords with MySQL® 4.1+ also command /scripts/mysqlup but no way still same error can not connect to Mysql
Unable To Connect To MySQL Databases
I've downloaded the MySQL 4.1 package for MacOS X.3 and things seem to be running, although I did have to manually run the mysql_install_db script as it didn't seem to run properly during install. Anyhow the PrefPane keeps telling me that the database server is running but when I try to connect using XOOPS or even an SQL GUI like Cocoa MySQL I cannot connect. I can login as root using the command line: mysql -u root -p and I can create databases and drop databases and tables etc but no external app can connect such as XOOPS or Cocoa MySQL using the same login details. Code:
Unable To Add Entries From Mysql Form
im trying to create a web page (form based) using mysql + php. So far my page loads up and i can delete comments striaght from the form itself, but i'm unable to add them????? dont know why this is happening, could someone help? i've pasted my code below, as i dont have a clue where the prob could be Code:
Unable To Connect To Any Of The Specified MySQL Hosts
I am trying to connect to a MySQL database with the .NET provider. I had not problem in the past to do so, and now I am getting an error message (pasted below). But the weird thing is that the connection string works fine with MySQL query browser. Code:
Unable To Run Mysql Service On Windows98se
I am trying to set the username and password after installing mysql 5, I run an ms dos prompt, and type in mysqld but am met with an error msg: C:Program FilesMySQLMySQL Server 5.0in>mysqld~2 061026 10:09:20 [ERROR] Can't find messagefile 'C:Program FilesMySQLMySQL Ser ver 5.0shareenglisherrmsg.sys' 061026 10:09:20 [ERROR] Aborting I checked the above folder and there is an errmsg.sys file, does anyone know what could be wrong?
Unable To Connect To Mysql Via Perl
I am attempting to connect to my mysql using a perl script, and keep getting an error message that tells me the I am missing a sub routine. I have installed DBI and DBD::mysql but still can not use my $dbh = open_dbi($db,$username,$password) I am assuming that open_dbi is not installed, does anyone know of another, or better way to access mysql via perl.
Unable To Establish Connection To MySQL
I have a PHPFusion site hosted by Servage. I keep recieving this error, it can be a simple refresh of my site or, clicking on different links. Unable to establish connection to MySQL 2002 : Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) It doesn't do it all the time but, it happens daily. Could anyone tell me if this is a problem with my hosting provider or, if this is some script error on my site?
Unable To Connect To Mysql Server
I have downloaded and installed the latest stable versin of MySql. I have followed the install steps and everything went fine. I have then installed phpmyadmin. I modified the config file to add my password for the root user. When I type the following address http://localhost/phpmyadmin to access the index page of phpmyadmin, I get this error message: phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server. Error MySQL said: Documentation #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client I double checked the password, it's the one I entered during the install process. The username is root. The host name is localhost.
Unable To Connect To Any Of The Specified MySQL Hosts
In my dev environment I'm running MySQL on Windows XP and it works fine. I can connect from other pc's on my lan no problem. At the customer however we are hosting the DB on a Linux box. Clients are running XP. When we try to connect we get the error: System.Exception: "Unable to connect to any of the specified MySQL hosts" I am using the .Net connector 5.1.4.0 The MySQL DB on the Linux box is MySql 4 We're administering via phpMyAdmin. We've tried changing firewall settings disabling etc to no avail. experimented with ports etc no help. I am used to a MS Server 200x and MS SQL environment so this is all new to me. Do I need to configure the DB or something to alow remote connections from within the LAN or something? I didn't set up the DB so I am not sure what configurations were specified?
Unable To Connect To Mysql Remotely
I just setup my RedHat 9.0 server and have it preconfigured for MySQL, Apache and PHP. I am able to connect to mySQL using a GUI client from my my LAN (192.168.1.xx), but unable to connect from a remote site. I have my linksys router configured to forward any requests for port 3306 to my redhat linux IP. I thought it would be also important to mention that I am able to connect to my Apache webpage remotely. "Cant connect to MySQL server on 'starfire.homelinux.net'" Error 10060 when trying to test from my ODBC drivers. I have also tried granting a connection for a user@%, but I still am having the same problem.
Unable To Connect To Mysql From The Command Line
i have a php application which successfully connects to mysql and interacts with the database. I am using apache as my web server. I would like to invoke my code from the command shell, using php.exe like so: c:phpphp.exe c:script.php in script.php I am using mysql_connect to connect to the database. I get the following error: Access denied for user 'root'@'localhost' (using password: YES) Note that the same script is working perfectly when invoked via the web server... what do I need to do in order to make my script work from the command line?
Unable To Add Large BLOBS (>10mb) To MySQL DB
One of the functions of the front-end is to allow file-upload into the MySQL database, as BLOBS. I seem to have hit some unpassable limit of approximate 10mb (9mb works, 13 mb fails), of the files that I can get into the database. I have upped the MAX_PACKET_SIZE in MySQL, and the wait timeout, I have upped the max execution, max input, and memory limits of PHP, all to no avail. The field in the database is a LONGBLOB, so should be OK. Can anyone pleeeease tell me that I am missing something obvious somewhere. I understand MySQL is supposed to be handle, theoretically BLOB sizes of up to 2 gig! Here is the snippet of code that does the uploading... I know this code works, as it works with smaller files...(up to approx 9mb) $attsql = "insert into attachments values("; $attsql .= $current_id.",'".$filename."','".$description."','".$filetype."','".$filesize."','".$data."')"; mysql_connect("host", "user", "password"); mysql_select_db("database"); mysql_query($attsql); If I output the $data to screen, it all seems to be there, but I think MySQL is just plain rejecting the query when the BLOB is big, as nothing is being inserted into the database. The PHP process runs, sends the query to MySQL, and, from that point, nothing happens. Thats how it seems to be. I can't help thinking this is just a configuration of MySQL that I have not quite gotten right, but I sure can't find it!! I am using PHP4 and MySQL 4.1
Unable To Do Joins With MySQL Query Browser
I downloaded the Query Browser for Windows. I try to join two tables as described in the manual, drag over the JOIN tables tab but nothing happens. The query remains as is.
Unable To Connect MySQL Server Across The Network
We have a MySQL server that was managed by another group in our company, the guy who used to manage that MySQL server has promptly left. Now this server has turned into me. I'm a Microsoft SQL guy, however, the manager doesn't think there is much difference between MSSQL and MYSQL. Now I am in the hot seat to fix a problem that just occurred last week. We're suddenly not able to connect this MySQL server across the network. I checked the network connection, everything looked fine, I was able to telnet into the port 3306. First I thought someone changed the root password, but I was able to connect the server from the local server by using: mysql -h localhost -u root -p Other accounts have the same problem as well. If I try to connect this MySQL server from a workstation, I'll get the following error message: ERROR 1045 (00000): Access denied for user: 'root@CS7LL11' (Using password: YES) It will be geatly appreciated if someone can inform me what I need to do to fix this problem. By the way, this MySQL server has the version # 3.32.56-nt
Unable To Connect To MySQL Server On Localhost (10061)
I'm trying to install invision pwr board for friends and family. I've got Apache2Triad on Windows, along with some other services like DC, Vent, Teamspeak (I'm a big gammer). I fill out the information to 'install' invision from the web address, click next and it says cannot connect to MySQL server on localhost (10061). I've created the database but didn't add any tables or anything cuz I don't know what tables to create. Invision doesn't say which tables, just says type in the name of the database. Don't know if my password is wrong (using the one I created at install of apache) or if it's a port issue (installing on host machine) etc... I've also tried to install a few other programs the same way; Bulletin Board, 3 different image hosting programs etc... all say the same thing, can't connect. All have there own databases with no tables (cuz programs doesn't say which tables to create). Code:
Get Access Denied Msg..how Can I "reset" Mysql Access
I downloaded the windows installation last night - mysql-4.0.16-win.zip - unzipped it to c:ms, double clicked on setup.exe and nothing.... nothing happened at all.... Bad download I though, so tried the same thing with the .zip of version 3.25.55 I had - the downlaod that I used once before, before my recent re-format - so I knew that it did work once, but this time, same problem. The setup.exe just doesn't do anything... I really want to learn mySQL, but if I can't even install the thing, it doesn't look good!
Unable To Run Mysql_install_db Please Help
i am trying to run mysql_install_db but my windows xp command prompt = give me the following error: 'mysql_install_db' is not recognized as an internal or external command, = operable program or batch file. How can i run this line?
4.1: Unable To Connect
MySQL 4.1 on Solaris 8. ./mysqladmin -u root -p 'password' Enter password: ./mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' Why is this happening? And what password is it asking?
Unable To ADD Databases
I'm just started the process of learning MySQL and databases in general. I just bought the book 'MySQL' written by Paul DuBois, who I gather is really active in this community. Anyhow.. Here's the problem that I'm having. mysql> GRANT ALL ON sampdb.* TO 'sampadm'@'localhost' IDENTIFIED BY 'secret'; Query OK, 0 rows affected (0.00 sec) mysql> show databases; +----------+ | Database | +----------+ | helpdesk | | mysql | | test | +----------+ 3 rows in set (0.01 sec) Anyone notice the problem? Even though I get no error.. the sampdb is not being greated. This is weird as I've been able to use this exact command in the past with no problems. I even tried logging in as root before starting the mysql client, still made no difference.
Unable To Log In As Root
I have just installed MySQL, PHP and Apache. I have been able to check that PHP and Apache are working together. I'm running on Windows XP. If I open MySQL through the start menu I enter the password and can use MySQL commands, use, insert, select etc normally and they work. If I try and log into MySQL using- mysql -u root password I get error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) This also means that I cann't use mysql_connect() in PHP I am baffled why I can use MYSQL through the start menu but not the command line or PHP comand. Can anyone explain / fix this?
Unable To Connect Via PHP
HTTP, PHP, and MySQL servers are all running localhost on my machine, and configured/setup. I am able to login and edit MySQL via Windows command prompt. But when I issue a PHP connect command and run the PHP page on my browser, I'm unable to connect. Here is my code: <?php mysql_connect("localhost", "root", "test") or die(mysql_error()); echo "Connected to MySQL"; ?>
Unable To Jump To Row
What is wrong with my QUERY? PHP Code: $result = mysql_query("SELECT * FROM $table WHERE ( LAT_1 BETWEEN '".$x_min."' AND '".$x_max."' ) AND ( LONG_1 BETWEEN '".$y_min."' AND '".$y_max."' )"); $total = mysql_result($result, 0, 0);
Unable To Connect
I am running XP and was having a problem with MySql 4.0 so I upgraded to 4.1.10, but now cannot access MySQL either from the localhost or from any clients. From the locahost I get "Host "localhost" is not allowed to connect to this MySql server". I also get the same error if I try to access the server from a client. I looked thru the other forum but have not seen a definitive answer to the problem.
Unable To Connect
I updated mysql on my computer(OS windows) and when I run any script i get: unable to connect to mysql server: Client does not support authentication protocol requested by server; consider upgrading MySQL client I'm a windows user so can someone advise me as to what to do to fix?do i have to download client tools separately?
Can Access Remotely, Cna't Access Locally (seems Backwards)
I have a database that I am trying to connect to a schema called lportal4_1_2 in mysql 4.1.13a (provided by my hosting company) runnning in fedora. I am trying to get a container to connect to it and was having problems. Since I didn't want to pollute the problem with the container, I wrote a small (hack) program that does the connection. Here is the problem: I can connect from my desktop (winxp) using a Java command line application, Mysql Administrator and mysql query browser and everything works fine. When I run the same Java command line app (using the exact same driver) I get the Access denied for user error that follows: ---- java.sql.SQLException: Access denied for user 'lportal'@'inkbrains.com' (using password: YES) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:798) at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3700) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1203)...........................
Unable To Create Database
Would any kind soul enlighten me on the error msg? Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource I kept on receive this warnings for almost 50 pages long! and the database fail to create, what could be wrong?
|