mySQL and phpmyadmin help

A

ajthornton

Guest
I have successfully setup phpmyadmin and mySQL of linux systems several times. I now have a macbook running mac os x 10.4.6. I am trying to get these two programs setup. I have the mysql running (i think) and i have setup the php config.include.inc script but i keep getting this error.
Code:
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
I do not think there is a root password so when i open http://localhost/phpMyAdmin i only get the error. i will post any needed information.
Thanks in advance,
ajthornton
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
Did you use the OS X install from MySQL?
 
OP
A

ajthornton

Guest
Murlyn said:
Did you use the OS X install from MySQL?

I got the install from here: http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html

And here is a snippet (the only part that I changed) of my config.inc.php file under the Library -> WebServer -> Documents -> phpMyAdmin.
Code:
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin/';

/**
 * Disable the default warning that is displayed on the DB Details Structure page if
 * any of the required Tables for the relationfeatures could not be found
 */
$cfg['PmaNoRelation_DisableWarning']  = FALSE;

/**
 * The 'cookie' auth_type uses blowfish algorithm to encrypt the password. If
 * at least one server configuration uses 'cookie' auth_type, enter here a
 * passphrase that will be used by blowfish. The maximum length seems to be 46
 * characters.
 */
$cfg['blowfish_secret'] = 'marines';

/**
 * Server(s) configuration
 */
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use
// $cfg['Servers'][0]. You can disable a server config entry by setting host
// to ''. If you want more than one server, just copy following section
// (including $i incrementation) serveral times. There is no need to define
// full server array, just define values you need to change.
$i++;
$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = 'root';      // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = '';   // access to the "mysql/user"
                                                    // and "mysql/db" tables).
                                                    // The controluser is also
                                                    // used for all relational
                                                    // features (pmadb)
$cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = '';   // MySQL password (only needed
                                                    // with 'config' auth_type)
 
OP
A

ajthornton

Guest
Let me try this again. I may have done something wrong. I installed the Mac OS X 10.4 (x86) version of mysql. I have installed and configured the phpmyadmin as stated earlier. I also installed the mySQL Administrator. When I open the mySQL Admin this is some of the data that I find:

MySQL Version: MySQL 5.0.22-standard via socket
Network Name: localhost
IP: 127.0.0.1

The service screen states that the server is running.
There is an /etc/my.cnf file
Two accounts are setup.
username - password
root - marines
ajthornton - marines

this is the full contents of the error log
Code:
060609 05:52:09  mysqld started
060609  5:52:09 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
060609  5:52:09  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
060609  5:52:09  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
060609  5:52:09  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
060609  5:52:10  InnoDB: Started; log sequence number 0 0
060609  5:52:10 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.22-standard'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)
060609  5:54:11 [Warning] Got signal 1 from thread 1
060609 11:41:44  mysqld started
060609 11:41:45 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
060609 11:41:45  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
060609 11:41:45  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43655.
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
060609 11:41:45  InnoDB: Started; log sequence number 0 43655
060609 11:41:45 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.22-standard'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)
060609 13:10:44 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

060609 13:10:45  InnoDB: Starting shutdown...
060609 13:10:48  InnoDB: Shutdown completed; log sequence number 0 43655
060609 13:10:48 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

060609 13:10:48  mysqld ended

060609 19:18:00  mysqld started
060609 19:18:00 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
060609 19:18:01  InnoDB: Started; log sequence number 0 43655
060609 19:18:01 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.22-standard'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)
060609 19:18:57 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown

060609 19:18:57  InnoDB: Starting shutdown...
060609 19:18:59  InnoDB: Shutdown completed; log sequence number 0 43655
060609 19:18:59 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

060609 19:18:59  mysqld ended

060609 19:19:42  mysqld started
060609 19:19:45 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
060609 19:19:45  InnoDB: Started; log sequence number 0 43655
060609 19:19:46 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.22-standard'  socket: '/tmp/mysql.sock'  port: 3306  MySQL Community Edition - Standard (GPL)

In the catalogs tab I can see the 3 tables (information_s, mysql, and test).

Now when I load via web browser http://localhost/phpMyAdmin I get the following message:
Code:
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

If you know a way to fix this, please let me know, or if more information is needed. I am willing to emial my AOL chat screen name for instant chatting if that would be helpful.


Thanks in advance,
ajthornton
 
OP
K

komo

Guest
why don't you just use MAMP, instead. i found out it's as easy as Windows' AppServ
 
OP
A

ajthornton

Guest
komo said:
why don't you just use MAMP, instead. i found out it's as easy as Windows' AppServ

komo, you are a life saver. I had no trouble getting things up and running. I just have one quick question. Is there a way to access the mySQL information from the terminal? If yes, how?

THANKS A MILLION, komo
ajthornton
 
OP
K

komo

Guest
ajthornton said:
komo, you are a life saver. I had no trouble getting things up and running. I just have one quick question. Is there a way to access the mySQL information from the terminal? If yes, how?

THANKS A MILLION, komo
ajthornton
what kind of "mySQL information" do you want to access to?
you can always access mysql from the terminal using "mysql" command line. just start the mysql service, go to /Application/MAMP/Library/bin, and typed "./mysql" without the quote.
that will bring up the mySQL prompt and (I think) you can work with your mySQL from there. i really never used that prompt anyway, phpmyadmin is a lot easier
 
OP
A

ajthornton

Guest
i have figured out what you said, but I am still having some problems. When I start MAMP I see that both the apache and mysql servers are started. I can click on the phpinfo link and see the phpinfo load properly. However, when I build a php document in /Applications/MAMP/htdocs and try to access it the page comes up blank. This happens with the basic
PHP:
<?php 
phpinfo(); 
?>
page up to a complex script. Anyidea what is going on?


komo said:
what kind of "mySQL information" do you want to access to?
you can always access mysql from the terminal using "mysql" command line. just start the mysql service, go to /Application/MAMP/Library/bin, and typed "./mysql" without the quote.
that will bring up the mySQL prompt and (I think) you can work with your mySQL from there. i really never used that prompt anyway, phpmyadmin is a lot easier
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
Sorry I would have responded sooner, but for some reason I was not getting notifications that there was a reply on this thread :) Good it sounds like you have it up and running.. hmm..

When you look at the blank page, view source, do you see the code? or is it blank also? If you do see the code then php is not parsing the page.. if you do not see the code.. then you might have a wrong path somewhere...
 
OP
A

ajthornton

Guest
I do see code. I am using this MAMP. It tells me to put everything in this htdocs folder, but it does allow me to change this folder location. Does anyone know how this will work. Also, what is meant by parsing the pae. is this something that I am doing wrong. This is exactly what I see when I view the code:

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
		<title>Using echo()</title>
	</head>
	<body>
	<?php
		phpinfo();
	?>
	</body>

</html>

Murlyn said:
Sorry I would have responded sooner, but for some reason I was not getting notifications that there was a reply on this thread :) Good it sounds like you have it up and running.. hmm..

When you look at the blank page, view source, do you see the code? or is it blank also? If you do see the code then php is not parsing the page.. if you do not see the code.. then you might have a wrong path somewhere...
 
OP
K

komo

Guest
ajthornton said:
I do see code. I am using this MAMP. It tells me to put everything in this htdocs folder, but it does allow me to change this folder location. Does anyone know how this will work. Also, what is meant by parsing the pae. is this something that I am doing wrong. This is exactly what I see when I view the code:

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
		<title>Using echo()</title>
	</head>
	<body>
	<?php
		phpinfo();
	?>
	</body>

</html>

CMIIW, but i think those codes can't be the one that showed up when you click "View Source" option on your browser. try to make a simple scripts using an echo or more, then post the source on your browser here
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
Did you name your file something.php? or something.htm(l)? If you you named it .php then php is not parsing that page which means you need to check your apache config file. now if you named it .htm or .html then rename it to .php and it should start parsing the page IF php is enabled.
 
OP
A

ajthornton

Guest
what is CMIIW? here is another simple code that I have tried.

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
		<title>Using echo()</title>
	</head>
	<body>
	<?php
		echo 'This is my first php script!';
	?>
	</body>

</html>

komo said:
CMIIW, but i think those codes can't be the one that showed up when you click "View Source" option on your browser. try to make a simple scripts using an echo or more, then post the source on your browser here
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
Again what did you name your file? PHP is definitely not parsing your code... And that's when you view source in the browser correct?
 
OP
A

ajthornton

Guest
the name of the file is first.php, and yes that is what I see when view code. Here is anothe one that I tried real quick this file is names phpinfo.php
PHP:
<?php
phpinfo();
?>
That is the code that I see, ehich is exacty what I typed.


Murlyn said:
Again what did you name your file? PHP is definitely not parsing your code... And that's when you view source in the browser correct?
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
Ok php is not parsing your code which means you will need to take a look at your httpd.conf file and enable it. Im going to be gone for about a day or more.. so hopefully someone else can help you from here. Although since you said that you have successfully set it up before on a linux system you should know all about the httpd.conf and how to enable php. If not.. someone should be able to walk you through it until I get back.
 
OP
A

ajthornton

Guest
Here are excerpts from my httpd.conf file. Does anyone see any problems?


Code:
<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule echo_module modules/mod_echo.so
LoadModule charset_lite_module modules/mod_charset_lite.so
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule example_module modules/mod_example.so
LoadModule case_filter_module modules/mod_case_filter.so
LoadModule case_filter_in_module modules/mod_case_filter_in.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule bucketeer_module modules/mod_bucketeer.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so

LoadModule php5_module        modules/libphp5.so

AddType application/x-httpd-php .php .phtml

if you need any other part of the httpd.conf, tell me and I will post it ASAP. BTW, murlyn, thanks for the help.

ajthornton
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
That looks fine, although Im curious as to when you installed MAMP if they are using a different conf file.. it's hard when you install special things like that since they usually want to use their own files. But maybe not.. Im not familiar with it enough to know. It definitely looks like you are loading php5
 
OP
K

komo

Guest
as far as i know, besides httpd.conf, MAMP use another configuration file, php.ini which is located on /Applications/MAMP/conf/php4 or /Applications/MAMP/conf/php5, depending on the PHP version you used. better check out that file, too
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
Yeah php.ini doesn't deal with the php parsing though, once you have php running then you can configure it with the php.ini file. Right now the problem is with the httpd.conf file. I can't help with the full MAMP install, but if you installed all of Marc's installs at http://www.entropy.ch then I could help you with that. Hopefully someone else knows what the MAMP install does, enough to help out. No help on their website?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top