phpmyadmin – Internetblog.org.uk https://www.internetblog.org.uk Web hosting, Domain names, Dedicated servers Fri, 29 Jan 2016 11:05:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.5 https://www.internetblog.org.uk/files/2016/01/cropped-favico-32x32.png phpmyadmin – Internetblog.org.uk https://www.internetblog.org.uk 32 32 MySQL Server Optimization https://www.internetblog.org.uk/post/1482/mysql-server-optimization/ Wed, 30 Jun 2010 16:08:42 +0000 http://www.internetblog.org.uk/post/1482/mysql-server-optimization/ Mysql logoIf you are running a dedicated server, optimization is very important to maximize speed, efficiency, and save time and energy. We have already looked at ways to optimize Apache web server, but many dynamic websites also use databases that hold the data for their dynamic web applications.

You can accomplish basic optimization of database tables from within your web-based control panel or in phpMyAdmin. You should do this routinely. But there are also ways you can optimize the server itself to serve databases faster and more securely. Over the remainder of this week, I will show you a few tips to optimize your MySQL server. Today, I will just point you to the right file.

To begin configuring your MySQL server, you will need to locate the configuration file. This will differ, depending on your operating system and even from one Linux distribution to another. Most commonly, it will be in a directory like /etc/mysql, and the file will be called my.cnf. You will need to edit it as root:

# nano /etc/mysql/my.cnf

Tomorrow, we will start to plow through this file for optimization tweaks.

]]>
How to create a table using phpMyAdmin https://www.internetblog.org.uk/post/1221/how-to-create-a-table-using-phpmyadmin/ Mon, 19 Apr 2010 19:31:36 +0000 http://www.internetblog.org.uk/post/1221/how-to-create-a-table-using-phpmyadmin/ phpMyAdmin new table screen
After you create a MySQL database, the next thing you will most likely want to do is to fill it with data. To do that, you need to setup tables. If you are installing a content management system or other type of script with an installer, it will probably create the tables for you. If that is not the case, you must create the tables yourself. While creating them from the command line is not terribly difficult, using the phpMyAdmin web interface is probably the easiest method.

To create a new table, follow these steps:

1. Login to your phpMyAdmin installation either through your control panel or directly.

2. On the left, click the database you want to manipulate.

3. At the bottom, underneath the current tables, find “Create new table on database” and enter the name and number of fields each row will have.

4. Enter the field names (each row will have a name assigned to it)

5. Select the data type. The default INT is for integer (i.e. a number). You can see a complete lists of data types on the mysql website

6. Select a maximum length or leave it blank

7. Set the type of collation, essentially the encoding, such as UTF-8.

8. When you have all of the information inputed, scroll to the bottom and click “Save”.

With that, you are all finished with your first table.

]]>
How to create a database in phpMyAdmin https://www.internetblog.org.uk/post/1202/how-to-create-a-database-in-phpmyadmin/ Wed, 14 Apr 2010 16:50:10 +0000 http://www.internetblog.org.uk/post/1202/how-to-create-a-database-in-phpmyadmin/ New database in phpMyAdmin
In a previous post, we learned how to create a MySQL database from the Linux command line. Today, we will learn how to accomplish the same task with a graphical interface using the free web-based MySQL administration tool: phpMyAdmin. Just follow these steps.

1. Login to phpMyAdmin either through your server’s control panel or directly.

Note: Some panels, such as cPanel require you to create databases through their interface. If so, follow their instructions

2. In the main Home section, look for “MySQL localhost“, and under “Create new database”, enter the name you want to use

3. Click “Create”

That is all it takes! You now have a new database. To assign users to the database, click the “Privileges” tab while you are still on that database’s page. Once you have the permissions you want, you can add, delete, and configure databases with relative ease.

]]>
How to manually grant privileges in MySQL https://www.internetblog.org.uk/post/830/how-to-manually-grant-privileges-in-mysql/ Mon, 28 Dec 2009 23:27:02 +0000 http://www.internetblog.org.uk/post/830/how-to-manually-grant-privileges-in-mysql/ MySQL Database
There are plenty of reasons why you might want to grant various privileges to a user in MySQL manually rather than with a control panel or phpMyAdmin. But regardless of the reason, the process is quick and easy, once you learn how to do it. For this you will need SSH access, which you will have with your own server or with special permission from your web hosting provider.

In this example, you will grant a user the “SELECT” privilege.

1. First login to your server via SSH and enter the following:

mysql -uadmin -p`cat /etc/psa/.psa.shadow`

(you will be prompted for your password)

2. At the “mysql>” prompt, enter:

GRANT SELECT ON database.* TO username@'localhost' IDENTIFIED BY 'password';

After you have assigned privileges, enter:

FLUSH PRIVILEGES;

You will need to replace “database”, “username”, and “password” with the appropriate information. That is all it takes to enter a basic privilege. For more extensive examples, see mediatemple.net

Photo Source: Flickr

]]>
Restoring a huge MySQL database https://www.internetblog.org.uk/post/720/restoring-a-huge-mysql-database/ Thu, 26 Nov 2009 19:23:54 +0000 http://www.internetblog.org.uk/post/720/restoring-a-huge-mysql-database/ phpmyadmin dump
Question: I have a shared hosting account but need to import a 3GB MySQL database. I do not have shell access, and phpMyAdmin always times out. How can I restore it?

Answer: You can use a script called BigDump to import your dumped MySQL database a little at a time. This will prevent it from timing out when PHP has an imposed limit. According to their site, this script is for people who want:

“To restore the very large backup of your mySQL database (or a part of it) into the new or the same mySQL database. You can’t access the server shell and you can’t import the dump using phpMyAdmin or any other scripts due to hard memory resp. runtime limit of the web server. ”

BigDump is free software released under the GNU General Public License.

Photo: Flickr

]]>
Database Management with phpMyAdmin https://www.internetblog.org.uk/post/616/database-management-with-phpmyadmin/ Wed, 28 Oct 2009 15:20:23 +0000 http://www.internetblog.org.uk/post/616/database-management-with-phpmyadmin/ phpMyAdmin logo
Question: I have a shared hosting account and need an easy way to manage my databases. What can I use?

Answer: Chances are, if you are using a server that has both PHP and MySQL, your web hosting provider has given you some type of tool to manage your databases. Most providers these days will not give you SSH access without jumping through hoops. Therefore, the only other practical way to manage MySQL is to use third-party software.

Check to see if your host offers phpMyAdmin. It should be accessible through your hosting control panel. With phpMyAdmin, you can import, export, create, and delete databases. You can set permissions, create users, and even run more advanced SQL queries. As the name implies, phpMy
Admin is written in PHP, making it very versatile and easy to install, and it is free software released under the GNU General Public License.

]]>
How to Import a MySQL Database https://www.internetblog.org.uk/post/492/how-to-import-a-mysql-database/ Tue, 15 Sep 2009 17:47:53 +0000 http://www.internetblog.org.uk/post/492/how-to-import-a-mysql-database/ phpMyAdmin screenshot
In a previous post, I explained a couple methods of exporting MySQL databases. Today, we will do just the opposite: import a mysql database. As with the previous example, you may use either phpMyAdmin, your web hosting company’s custom control panel interface (if available), or the Linux command line, if you have the necessary permissions to do so.

Command line

To import a mysql database, upload your sql file to your server and login to your server via SSH. Then, enter the following commands:

mysql -p -h localhost dbname < dbname.sql

Replace “dbname” with the name of your database in the first instance and the name of your sql file in the second.

phpMyAdmin

Although this requires more steps, some people might find it easier.

1. Login to phpMyAdmin.
2. Click on your database name.
3. At the top, click “Import”
4. Click “Browse…” and find the sql file on your computer.
5. Click “Go”.

If you are working with a very large sql file, it may timeout in phpMyAdmin, depending on your server’s settings. In such a case, the command line may be a better option.

]]>
How to Export a MySQL Database https://www.internetblog.org.uk/post/455/how-to-export-a-mysql-database/ Fri, 04 Sep 2009 17:26:10 +0000 http://www.internetblog.org.uk/post/455/how-to-export-a-mysql-database/ MySQL Database
Question: How do I export and download a MySQL database?

Answer:

There are two primary ways to export a MySQL database if you are a website owner. The first is to use phpMyAdmin, a web-based graphical interface for managing databases. The second is to login through SSH and use MySQL commands. A third option, if available, is to use your web host’s control panel system.

phpMyAdmin

1. Login to phpMyAdmin (The method of reaching it varies based on host. You can reach it through many web hosting control panels).
2. Click on the database you want to download.
3. Click the “Export” tab.
4. Select a format (i.e. CSV, SQL, XML).
5. Check “Save as file” and decide whether or not you want a compressed file (helpful for big databases).
6. Click “Go”.

Command Line

In some cases, especially if you have a very large database, it might not be possible to use phpMyAdmin. If you have SSH access, logging into mysql directly is an easy way export a database.

1. Login to your server via SSH
2. Enter this command:

mysqldump -u username -ppassword database_name > dump.sql

3. Use a regular file transfer method, such as FTP, to download the dump.sql file.

Photo: Flickr

]]>