Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

phpMyAdmin Tutorial Pagina 1 di 12 phpMyAdmin Tutorial Pagina 2 di 12

phpMyAdmin Tutorial 6. Recommended Sites

Credits
Last Updated : 30/12/01
Contact Details

How this Guide works :

I have tried to make it easier for you to understand by bolding any key words or
items which you need to look for, italicing anything which should also be noticed but
is not essential and also have made screenshots which are really just tables set to
look like the real thing.
Please Read :

This is a Tutorial/FAQ for setting up phpMyAdmin available for download from here.
Updates
Legalities / Disclaimer :
30th I've finished setting up the new NukeTutorials.com and started
Click on LICENSE up above and you will be taken to the license agreement. If you December writing this guide.
cannot see the menu because you found this site through a search engine, click
here to go to the main menu and then try again..
PLEASE SIGN!!
If there is no bar at the top; please email me immediately as this site is illegally
hosting my guide and I am receiving no money for it. If you see it on my site then I Please - If you found this guide helpful or not helpful, or have any comments or
get money because there is a popup add - anyway, the money is used to pay for suggestions, please sign my guest book as it would mean a lot to me (I've never
domain fees and hosting fees. had a guest book with more than 10 entries) - also note it might be a bit slow but
please sign it
These guides are free for you to use and the most updated one and the now official
host is located on Nuke-Hosting. The URL for this site is Guest Book
www.nuketutorials.com. For the latest guide, be sure to go to this page. Sign Guestbook View Guestbook

1. Downloading
CONTENTS
Obviously you will need to download phpMyAdmin from
How this Guide works http://phpmyadmin.sourceforge.net/ if you plan on installing it. It is also an
incredibly smart idea to have a check whether or not you already have it. F2S users
Updates already have it and it can be found at www.f2s.com/db and most other hosts which
support MySQL have it already setup. Once your sure you haven't got it; continue
PLEASE SIGN!! on!

1. Downloading Now, once you have downloaded phpMyAdmin you will need something to unpack
it with. It comes in many different flavors. Here is a screenshot from the site (ps.
you have to click on download phpMyAdmin.. its near the bottom.. or here)
2. Setting Up!

3. Uploading Bugfixes, patchs, translations, suggestions and comments are


welcome! Please use the mailing lists and the forums!
4. Running

5. The Basics
Release Announcement for 2.2.0
Importing SQL files
Dumping (viewing) a table
Deleting (drop/empty) a table
News: phpMyAdmin 2.2.2 has been released!

mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002


phpMyAdmin Tutorial Pagina 3 di 12 phpMyAdmin Tutorial Pagina 4 di 12

PHPNuke details. For Windows users I recommend you use Wordpad as for some
unknown reason; my Notepad failed to open it neatly and made it look like alot of
- Download phpMyAdmin-2.2.2-php.tar.bz2 words jumbled up...
- Download phpMyAdmin-2.2.2-php.tar.gz
(.php files) Below is an extract from the configuration file with the important parts BOLD. This
- Download phpMyAdmin-2.2.2-php.zip is near the top and this is the main configuration area. You can change most of the
things here if it is not working. There are also options for you to enter in a
- Download phpMyAdmin-2.2.2-php3.tar.bz2 predefined user/password/server and also the option to restrict the use to only one
- Download phpMyAdmin-2.2.2-php3.tar.gz database. Anyhow, do not worry about these and just concentrate on the main
(.php3 section.
- Download phpMyAdmin-2.2.2-php3.zip
/**

* Bookmark Table Structure

This is what it looked like when I wrote this guide but I'm pretty sure they will stick *
to a similar format in the future. Notice how there are two different sections - .php
files and .php3 - well, they are for different kinds of servers. You will most likely * CREATE TABLE bookmark (
be using the standard php version as php3 is only used in special cases and
chances are, your not one of them. Which version to download? If you are on a * id int(11) DEFAULT '0' NOT NULL auto_increment,
Unix-based (this includes Linux) machine then you should probably go for the native
tar.gz but if not then you should go for the standard zip file. If you are using
* dbase varchar(255) NOT NULL,
Windows, you should download the zip as most of you have WinZip or some
Zipmagic-like program anyway. Also note that you can download the documentation
somewhere but you'll never read it. Anyway; its not like your going to use it for * user varchar(255) NOT NULL,
much (are you?)... In case you didn't get any hints before; you will need to get
some sort of unpacking utility and if you are using Windows then you should try * label varchar(255) NOT NULL,
Winzip avaliable from http://www.winzip.com/ and http://www.download.com/ .
The double bonus is that it also works with tar files which are commonly used for * query text NOT NULL,
Unix things and also for PHPNuke. For those Unix-n00bs, type this tar xzvf
phpMyAdmin_2.2.2.tar.gz (obviously if you are using a different version you * PRIMARY KEY (id)
change the '2.2.2' accordingly) - also n00b is "newbie" (say noooo-beee)...
* );
The next thing you will need is something to upload it with - I prefer to use a
program called SmartFTP from http://www.smartftp.com/ as it is easy to use, *
much more user-friendly than WSFTP_LE is, tends to be more stable and is also
fully functional and totally free.
*/

The last step is to (in case you never thought of it before) make sure your server
can support PHP. If it doesn't support it then there really is little point. If you are
using Linux then now might be a good time to download the php-mysql rpm
/**
update;

* Your phpMyAdmin url


ftp://ftp.redhat.com//pub/redhat/redhat-7.1-en/os/i386/Redhat/RPMS/php-mysql-
4.0.4pl1-9.i386.rpm
*
Now your set to go! Time to have some fun...
* Complete the variable below with the full url ie

* http://www.your_web.net/path_to_your_phpMyAdmin_directory/
2. Setting Up!
*/
If you haven't unzipped/untared your phpMyAdmin files, you better do so now
before we continue. $cfgPmaAbsoluteUri = 'http://seremify.nukeelite.com/phpmyadmin/';

To start you have to open up the config.inc.php file which contains all the
configuration details in a similar manner to the way config.php holds all of the
/**

mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002


phpMyAdmin Tutorial Pagina 5 di 12 phpMyAdmin Tutorial Pagina 6 di 12

* Server(s) configuration needed with basic auth)


Obviously you put your username and password in here. Between the two ' ' again.
*/ This way when you get there it will automatically log you in. Also note if you wish to
make it so it won't log you in automatically, change the setting for advanced
// The $cfgServers array starts with $cfgServers[1]. Do not use $cfgServers[0]. authentication.

// You can disable a server config entry by setting host to ''. $cfgServers[1]['adv_auth'] = FALSE; // Use advanced authentication?
That is the advanced authentication setting. Change the word false into true to
require you to enter in your login details (and server details) every time you want
$cfgServers[1]['host'] = 'localhost'; // MySQL hostname
to check your database. This is obviously much more safer than if you leave it as
open. Also note that if you use Advanced Authentication, do not enter your
$cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port password into the password section of the configuration file (below the username).
Remove it. Leave the username there though. When you've set it properly it should
$cfgServers[1]['socket'] = ''; // Path to the socket - leave blank for look like this;
default socket $cfgServers[1]['adv_auth'] = TRUE; // Use advanced authentication?

$cfgServers[1]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or Make sure you set all the details in the ones marked $cfgServers[1] as the other
'socket') ones refer to other 'bookmark's. Don't worry about them.

$cfgServers[1]['stduser'] = ''; // MySQL standard user settings (this user must Like I said before, the rest of the stuff isn't that important but can be changed to
have read-only suit yourself - its easier just to leave it as it leaves less of a chance for it to stuff up.

$cfgServers[1]['stdpass'] = ''; // access to the "mysql/user" and "mysql/db" tables)

$cfgServers[1]['adv_auth'] = FALSE; // Use advanced authentication? 3. Uploading

$cfgServers[1]['user'] = 'seremify'; // MySQL user You've extracted all the files and now its time to upload. This bit seems easy
enough and all you need to do is make sure you've setup SmartFTP to upload php
$cfgServers[1]['password'] = 'password'; // MySQL password (only files in ASCII mode and not binary mode.
needed with basic auth)
To set SmartFTP to upload PHP files in ASCII, follow these steps;
$cfgServers[1]['only_db'] = ''; // If set to a db-name, only this db is displayed at
left frame 1. Open SmartFTP (Start -> Programs -> SmartFTP -> SmartFTP)
2. Click Tools -> Settings... to open up the configuration of SmartFTP
3. In the top left of the popup box (or in other versions, it may be slightly
different) there is a tab called Extensions - click it.
4. There are two parts of this dialog box; the Ascii Filter and the Exclusion
$cfgPmaAbsoluteUri = 'http://seremify.nukeelite.com/phpmyadmin/'; Filter. Binary is used for images only. To set PHP files for ASCII, click the text
Set the URL of where-ever you are putting phpMyAdmin here. Make sure to include box above the ASCII list and below the words Ascii Filter. Enter in
the full path with the / at the end otherwise it won't work. This is probably the (exactly) .*\.php$ and click on Add.
most important part so make sure its right! Also note - put your site address
between the parenthesizes (the ' and the other ') otherwise again it will not work.
5. Click on OK and then its done. Now when you upload in PHP it will upload in
Leave the ; there as it is there for a reason. In case you also didn't notice this; I am ASCII mode.
installing it to my test site (seremify.nukeelite.com) under the subdirectory
phpmyadmin. Now, insert your server details (not the MySQL details - the actual server host
details) into the boxes (obviously the server address goes where the address box is
$cfgServers[1]['host'] = 'localhost'; // MySQL hostname - don't try to use 'localhost' if its a remote server, the username, the port, obviously
$cfgServers[1]['port'] = ''; // MySQL port - leave blank for default port go where the boxes are..) Once you've put everything in click on CONNECT the top
$cfgServers[1]['socket'] = ''; // Path to the socket - leave blank for default left button on the toolbar. It should be connecting. If you cannot see a list of the
socket stuff on your hard drive - scroll your mouse over the toolbar until you find an option
Thos two lines should be left alone but if it does not work; try setting the localhost which kind of resembles a computer icon similar to the My Computer icon. Hover
to your actual server address and then it might work better. Also, the default port over it and it will say Local Browser. Click it and then *pop* comes a local
setting is 3306 which usually works but if yours is different and you know it (or browser.
you've had problems) then try changing it and remember to put it between the '
and the other '. Find your phpMyAdmin files on your hard drive and when you've found them, select
them all using shift or by using the 'click and drag' method. Once selected, just
$cfgServers[1]['user'] = 'seremify'; // MySQL user drag all the files over to the remote window (the one which isn't the window you
$cfgServers[1]['password'] = 'password'; // MySQL password (only dragged them from in the first place) and then watch it upload. Luckily this program

mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002


phpMyAdmin Tutorial Pagina 7 di 12 phpMyAdmin Tutorial Pagina 8 di 12

doesn't need to be chmod'd (a very long and tiring process which should have an IMPORTING SQL FILES
easier way of doing it)... One of the tasks you may need to do is to import SQL files. To do so, click on your
database name on the left and you will see this screen in the right frame; (yes
again I ripped it off my own guide for the F2S installation..)

4. Running Database seremify

Here is where we finish our journey... :(


z Print view
NOTE : These screenshots are from an older version of phpMyAdmin (2.2.0) and
z
also the colors are different but the general layout is very similar so work your way
around I'm sure you'll be alright.
Run SQL query/queries on database phpnuke [Documentation] :
You go to the address of your site (the address you entered in before for the
phpMyAdmin path) and it will load. If not, then go to the address with /index.php
on the end. It should load unless you've got another index.php file in there or
something like that in which case, delete the other file or rename it or something...

If you are using BASIC AUTHENTICATION where you don't need to enter your
password to login and its all automatic; then you will be faced with a screen like this
(yes I ripped it from my Nuke on F2S guide..)
Show this query here again

Home
phpnuke (0)
Welcome to phpMyAdmin Or Location of the textfile :

2.2.2 Sfoglia...

Go
MySQL 3.23.37 running on localhost as
seremify@localhost
z Query by Example

MySQL phpMyAdmin
Create new table on database seremify :
Log out Language: English (en) Go
Name :
(*) phpMyAdmin documentation Go
Fields :
Official phpMyAdmin Homepage
Sourceforge phpMyAdmin Download
Page
[ChangeLog] [CVS] [Lists] Your screen may be slightly different but the elements will remain the same. Now,
what you should do is see where it says Or Location of the textfile :, there should
be a Browse button there and you should click it. Now, you have to find the file
that you want to import. Click on GO and then everything should be setup.

Note : You do not need to save as it does that for you (lucky..) but in a way thats
bad because you can't undelete stuff... (this is a warning)

LOOKING AT THE CONTENTS OF YOUR DATABASE (DUMP)


If you are using ADVANCED AUTHENTICATION (recommended) where you have
Sometimes you will need to do a dump of your database to have a look at the
to login with your username and password you will be prompted with an IE (or
contents. Usually used by me if I forget my phpnuke password, I open up the
Netscape) prompt asking you to login. After logging in you will go to the page
nuke_authors table which contains the password by clicking the nuke_authors on
above.
the left (after clicking on my database name). Then in the right frame there is the
option to dump it. On the database page as well (the page from clicking on the
database name) there is the option to dump it. I prefer it here as it is easier to
reach and you can see all your tables as well as have more options. Here is a
5. The Basics screenshot;

mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002


phpMyAdmin Tutorial Pagina 9 di 12 phpMyAdmin Tutorial Pagina 10 di 12

Name :
nuke_stories_cat Browse Select Insert Properties Drop Empty 0 MyISA Fields : Go

nuke_topics Browse Select Insert Properties Drop Empty 28 MyISA


nuke_users Browse Select Insert Properties Drop Empty 1 MyISA
48 table(s) Sum 145 -- Note the section which says view dump (schema)? That is it. Select that and then
Drop Empty the table you want (in my case it was nuke_authors) and then click on GO. You
With selected: Or should select structure and data so you can see whats in it (structure are the
columns of the table without the data, data is the data but not the column info.. try
it out).
z Print view
DELETING A TABLE
z
By clicking on your database's name, you come to the page which is shown up
above for dumping the info, except at the top it is like this;
Run SQL query/queries on database auz [Documentation] :

Database auz running on localhos


Table Action Records
nuke_authors Browse Select Insert Properties Drop Empty 1
nuke_autonews Browse Select Insert Properties Drop Empty 0
nuke_banner Browse Select Insert Properties Drop Empty 0
Show this query here again
nuke_bannerclient Browse Select Insert Properties Drop Empty 0
nuke_bannerfinish Browse Select Insert Properties Drop Empty 0
Or Location of the textfile : nuke_blocks Browse Select Insert Properties Drop Empty 16

Sfoglia...
Go Drop is to delete it fully whilst Empty is to delete all the data but leave all the
columns behind.
z Query by Example
z View dump (schema) of database
6. Recommended Sites :

nuke_authors http://phpmyadmin.sourceforge.net/ - The official phpMyAdmin site


nuke_autonews Structure only
nuke_banner Structure and data
nuke_bannerclient http://www.nukesupport.com/ - An excellent forum (I visit there often) to get help
Data only with many things relating to PHPnuke. This site tends to have more 'newbies' and
nuke_bannerfinish
'installation' interest.
Add 'drop table'
Complete inserts
Extended inserts Credits
Use backquotes with tables and fields' names
Save as file To anyone who is hosting this guide especially Nuke-Hosting for hosting these
guides for me for free.
Go
A LOT of help was given to me by the users of NukeSupport Message Boards -
z http://www.nukesupport.com/

Create new table on database auz : Of course I've got to thank the guys that made phpMyAdmin possible.. I'll put you

mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002


phpMyAdmin Tutorial Pagina 11 di 12 phpMyAdmin Tutorial Pagina 12 di 12

all at the end as there is a huge list.. here


The following people have contributed minor changes, enhancements, bugfixes or
or support for a new language since version 2.1.0:
.. and Me :) Bora Alioglu, Ricardo ?, Sven-Erik Andersen, Alessandro Astarita, Borges Botelho,
Olivier Bussier, Michal Cihar, Neil Darlow, Kristof Hamann, Thomas Kläger,
Lubos Klokner, Martin Marconcini, Girish Nair, David Nordenberg,
Email any issues, problems, illegal hosting or anything about this guide, F2S or Bernard M. Piller, Laurent Haas, "Sakamoto", www.securereality.com.au,
PHPnuke to seremify@phpnuked.com Michael Tacelosky, Daniel Villanueva, Vinay, Ignacio Vazquez-Abrams,
Chee Wai, Jakub Wilk, Thomas Michael Winningham.

Original Credits of Version 2.1.0


---------------------------------
Contact Details :
This work is based on Peter Kuppelwieser's MySQL-Webadmin. It was his idea
to create a web-based interface to MySQL using PHP3. Although I have not
Jeff C seremify@phpnuked.comICQ : 7929694 seremify.nukeelite.com used any of his source-code, there are some concepts I've borrowed from
him. phpMyAdmin was created because Peter told me he wasn't going to
Guest Book further develop his (great) tool.
Thanks go to
Sign Guestbook View Guestbook - Amalesh Kempf <ak-lsml_at_living-source.com> who contributed the
code for the check when dropping a table or database. He also suggested
that you should be able to specify the primary key on tbl_create.php3. To
phpMyAdmin - Credits version 1.1.1 he contributed the ldi_*.php3-set (Import text-files) as
==================== well as a bug-report. Plus many smaller improvements.
- Jan Legenhausen <jan_at_nrw.net>: He made many of the changes that
CREDITS, in chronological order were introduced in 1.3.0 (including quite significant ones like the
------------------------------- authentication). For 1.4.1 he enhanced the table-dump feature. Plus
bug-fixes and help.
[tr] - Tobias Ratschiller <tobias_at_phpwizard.net> - Marc Delisle <DelislMa_at_CollegeSherbrooke.qc.ca> made phpMyAdmin
* creator of the phpmyadmin project language-independent by outsourcing the strings to a separate file. He
* maintainer from 1998 to summer 2000 also contributed the French translation.
- Alexandr Bravo <abravo_at_hq.admiral.ru> who contributed
[md] - Marc Delisle <DelislMa_at_CollegeSherbrooke.qc.ca> tbl_select.php3, a feature to display only some fields from a table.
* multi-language version - Chris Jackson <chrisj_at_ctel.net> added support for MySQL
* various fixes and improvements functions in tbl_change.php3. He also added the
"Query by Example" feature in 2.0.
[om] - Olivier Müller <om_at_omnis.ch> - Dave Walton <walton_at_nordicdms.com> added support for multiple
* started SourceForge phpMyAdmin project in March 2001 servers and is a regular contributor for bug-fixes.
* sync'ed different existing CVS trees with new features and bugfixes - Gabriel Ash <ga244_at_is8.nyu.edu> contributed the random access
* multi-language improvements, dynamic language selection features for 2.0.6.
* current project maintainer, with Marc and Loic The following people have contributed minor changes, enhancements, bugfixes
or support for a new language:
[lc] - Loïc Chapeaux <lolo_at_phpheaven.net> Jim Kraai, Jordi Bruguera, Miquel Obrador, Geert Lund, Thomas Kleemann,
* rewrote and optimized javascript, DHTML and DOM stuff Alexander Leidinger, Kiko Albiol, Daniel C. Chao, Pavel Piankov,
* started to rewrite the scripts so they fit the PEAR coding standards Sascha Kettler, Joe Pruett, Renato Lins, Mark Kronsbein, Jannis Hermanns,
and generate XHTML1.0 and CSS2 compliant codes G. Wieggers.
* improved the language detection system
* many bugfixes and improvements

[rj] - Robin Johnson <robbat2_at_users.sourceforge.net>


* database maintence controls
* table type code

[af] - Armel Fauveau <armel.fauveau_at_globalis-ms.com>


* bookmarks feature
* multiple dump feature
* gzip dump feature
* zip dump feature

[gl] - Geert Lund <glund_at_silversoft.dk>


* various fixes
* moderator of the phpMyAdmin users forum at phpwizard.net

[kc] - Korakot Chaovavanich <korakot_at_iname.com>


* "insert as new row" feature

[pk] - Pete Kelly <webmaster_at_trafficg.com>


* rewrote and fix dump code
* bugfixes

[sa] - Steve Alberty <alberty_at_neptunlabs.de>


* rewrote dump code for PHP4
* mySQL table statistics
* bugfixes

[bg] - Benjamin Gandon <gandon_at_isia.cma.fr>


* main author of the version 2.1.0.1
* bugfixes

mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002 mhtml:file://C:\Temp\Syscomsrl\software\phpMyAdmin%20Tutorial.mht 22/12/2002

You might also like