You guys have been so helpful, I'm probably gonna wear out my welcome fast!
Anyway -- I read a good tutorial on MySQL basics and want to get started. I have an account on GoDaddy which provides me with MySQL databases. I've done a couple of PHP tutorials (and am not above appropriating code out of tutorials and modifying them for my own use). One of the tutorials on MySQL recommended -- highly -- that I should install phpMyAdmin on my server to use, presumably as a front-end to keep from having to write detailed php scripts to get started. Is this the general gist of the recommendation or did I get it wrong (again )
I downloaded phpMyAdmin and have it on my machine. How do I use it? I couldn't find a readme there was so much stuff in the zip I extracted. What do I need to upload to my server in order to be able to use phpMyAdmin?
I can (probably) hack the scripts to get done what I need to do, but that's sorta like saying that all the works of Shakespeare and Milton would eventually be written by a roomful of monkeys given typewriters and enough time.
Can someone give an old (and I mean old) noob a push in the right direction on this?
phpMyAdmin does have a feature which allows you to view PHP code for queries that it performs however I would recommend not using it. phpMyAdmin is basically a web based GUI to the MySQL server. It's easier to use than logging into a terminal and typing in queries and commands.
Write your queries by hand in PHP code and you will have insight into what is happening and fine grained control.
My 2c
Last edited by Benjamin on Mon Mar 27, 2006 10:36 pm, edited 2 times in total.
phpMyAdmin isn't so much a tool your scripts can use per se, but an administrative tool you can use to create, read, update and delete as you wish. It isn't the best tool possible, but there is none better as far as I've seen (publicly available.) So while you are getting the hang of things or want to run some queries to try things out without using the command-line interface for MySQL, phpMyAdmin works great. I wouldn't exactly recommend having it available on a public site, but having it on a dev machine can be helpful.
On setting it up, their documentation is fairly decent (that I remember). It has quick installation and set up parts linked from early on in the page.
My intended use of phpMyAdmin was to get something functional on my site faster. I agree with agtlewis that there is nothing like mastery of a tool.
feyd, I found and read the documentation.txt that came with phpMyAdmin. It mentioned that there would be a dialog when running the setup file in your browser, but what I get is just script commands. I don't know enough yet to be able to decipher -- from the code -- what variables I should be supplying to the setup process.
Thanks again for your help. I really DO appreciate it.
First there's this in the "documentation.html" file:
Setup script usage
Since 2.8.0 phpMyAdmin comes with a setup script that can help you with creating configuration. This script is located in scripts folder: scripts/setup.php. Its usage is quite simple. You follow the dialogs and this script prepares in memory the configuration directives. You then have two choices for saving the configuration file:
1. Download it to your local workstation, then upload (for example with ftp) to your main phpMyAdmin directory. In this case, you don't have to prepare a special config directory, so no further actions are necessary.
2. Save the file to your webserver into config directory.
When I go to the "scripts" folder and look at the referenced "setup.php" file with my browser all I see is code. I can open it in Crimson Editor, and I can see the details of the script. I was expecting to find an interactive dialog with the browser. What am I missing?
I'm certain that it's ignorance on my part. Perhaps I'm not reading the documentation carefully enough. Guess I need a VERY simple 1-2-3; do-this and you-see-this then do-this kind of thing.
You really don't need to install phpMyAdmin and I have never heard of it having an install folder or a setup.php file. There is configuration file that you need to edit. Other than that just upload it and run it.
Since 2.8.0 phpMyAdmin comes with a setup script that can help you with creating configuration. This script is located in scripts folder: scripts/setup.php. Its usage is quite simple. You follow the dialogs and this script prepares in memory the configuration directives. You then have two choices for saving the configuration file:
I spoke too soon. I guess the new version has a setup script. In that case it does sound like your .php files aren't being interpreted.
I've used phpmyadmin for all of my database work. In fact i think i'd be lost without it. I guess that's the ups and downs of it.
In short, i reccommend it.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
BobH - TAN wrote:First there's this in the "documentation.html" file:
Setup script usage
Since 2.8.0 phpMyAdmin comes with a setup script that can help you with creating configuration. This script is located in scripts folder: scripts/setup.php. Its usage is quite simple. You follow the dialogs and this script prepares in memory the configuration directives. You then have two choices for saving the configuration file:
1. Download it to your local workstation, then upload (for example with ftp) to your main phpMyAdmin directory. In this case, you don't have to prepare a special config directory, so no further actions are necessary.
2. Save the file to your webserver into config directory.
When I go to the "scripts" folder and look at the referenced "setup.php" file with my browser all I see is code. I can open it in Crimson Editor, and I can see the details of the script. I was expecting to find an interactive dialog with the browser. What am I missing?
I'm certain that it's ignorance on my part. Perhaps I'm not reading the documentation carefully enough. Guess I need a VERY simple 1-2-3; do-this and you-see-this then do-this kind of thing.
Thanks for your help, jrd.
I'm guessing you need to do a little bit of editing. The setup script is called "config.inc.php". Look for it under your install directory. Open it, scroll down and change these values to suit your configuration. -refer to sample below-
// 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 ''.
$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'] = ''; // 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'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'XfG3434hjI'; // MySQL password (only needed
// with 'config' auth_type)
$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
If you have a GoDaddy account then phpMyAdmin is already installed on your hosted server. If you are setting this up because you want to learn how to install phpMyAdmin then kudos to you. But if you want to use it for the sake of database administration, use the one that is set up on your hosting account control panel. It is a little more secure because it is usually behind a file system that is not directly on your shared hosting server. Plus you don't run the risk of setting your PMA install up in a way that allows "folks with less than honest intent" to get to your data.
actually I believe there is no 'config.inc.php' with the newer versions. You have to create it yourself by copying & renaming the config.class.php or some other file... if memory serves me.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
also, i wouldn't reccommend godaddy. i've worked with their databases and they're not real time updates. i had to wait 20 minutes for my database to be created.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
scottayy wrote:actually I believe there is no 'config.inc.php' with the newer versions. You have to create it yourself by copying & renaming the config.class.php or some other file... if memory serves me.
oh man, if it were my first time and i had to do that, i'd rather look for alternative programs.