Windows.  Viruses.  Laptops.  Internet.  Office.  Utilities.  Drivers

Greetings, dear visitors of my site. In this small note we will create a database in Denwer, a continuation of the topic we started: Installing a local Denwer server.

So, we already have Denwer installed, we launch it by double-clicking on the Start Denwer icon. Open your browser and enter http://localhost in the address field and press enter. The Denwer package home page will open.

Find the item where it says Check MySQL and phpMyAdmin and click on the address to the left of it, or you can directly enter http://localhost/Tools/phpMyAdmin in the address field, this way we will open a program for working with databases called phpMyAdmin, a fairly common program for creating and editing databases.

After the window opens, see below, we need to enter the name of our database in the creation field. Since in the future I plan to install the Drupal content management system in this database, I accordingly make the name of the database so that later it would be clear what kind of database it is, which I advise you to do.

To ensure that you don’t have problems with encodings in the future, select the international collation system under the name utf8_general_ci, after entering the name of the database and selecting the collation, click on Create.

Now our new database has been created and the next step is to create a user with all rights to work with the database. To do this, go to the Privileges tab, see below. It is important to make sure that on the left under Database you have selected the correct database.

Click on the item where it says Add a new User.

In the window for adding a new user, we need to fill in such fields as the user name, if the database was created on a local computer, as in our case, then you need to enter Localhost, create a password for the user and then check the box next to Grand all privileges on database and click on global privileges Check All and click on the Go button in the lower right corner. See below.

This completes the creation of the database; do not forget to write down the user database name and password; this will be useful later when installing various applications.

(1 ratings, average: 5,00 out of 5)

How to create a database in Denver

Good instructions for creating a database in Denver - http://www.master-live.ru/phpmyadmin.html

This article was created on its basis (we will present it here with minimal clarifications and changes)

Test site on WordPress - installation

Website engines: WordPress, Joomla and Drupal - each of them has its own flavor. WordPress can be called a favorite among webmasters. It’s not without reason that it’s been used for blogging since childhood. But it is not as simple as it might seem at first glance. Joomla is the most common and very convenient for creating websites - at first everything seems a little confusing, but it only seems so. Drupal is a lifelong love. It has great prospects and the best user support. You can create a project of any complexity.

Today we will test the wordpress engine on your local machine. This means that we do not need to buy a domain and hosting - it will all be on our computer thanks to Denver.

Denver is a program that will turn our local computer into a server. It is better to download the distribution from Denver’s “native” website.

The created site will be viewable only on this computer, and not for Internet users. But that's what we need. We will create a test site or blog to deepen our knowledge of engines and finally learn how to create a database and a MySQL user.

1 step. Installing Denver - All instructions are on the Denver website, and you can also read the forum if you have any problems.

Step 2. Create a folder to store test site files.

* To do this, go to the folder where Denver is installed, by default this path is C:WebServers.
* Then go to the home folder and create a folder in it for our website files, for example inestkal.ru. We have created a site name and it will have the address http:// inestkal.ru.
* Now we go to the inestkal.ru folder and already in it we make a folder called www (into this folder “www” you will need to unpack the files of WordPress or any other engine a little later).

Step 3. Creating a database in Denver - step-by-step instruction.

The site's articles will be physically located in the MySQL database - the site engine (Wordpress) works with this MySQL database. Accordingly, Denver must provide work with the MySQL database (it is included in the Denver kit).

1. Denver has created shortcuts on the desktop, find and run Start servers. Two black windows will quickly appear and disappear on the computer screen, do not disturb them, then launch your browser and type in the address bar: http://www.localhost/
2. On this page, find the Utilities heading, where follow the link Creating new MySQL databases and users.
3. Fill out the web page that opens like this:

* MySQL administrator password:<оставьте пустым>
* Database name: testwp
* User login: testwp
* Password: testwp
* Repeat password: testwp
* And click the Create database and user button.

4. The page will reload unnoticed by your eyes and after the title the following message will appear: The database and a new user have been created

5. So simply and quickly we created a database called testwp; to access the database, the login and password testwp will be used.

Step 4 Installing a WordPress distribution.

6. Unzip the package into an empty directory - this is the www folder created in Denver.
7. Open wp-config-sample.php in any text editor and fill in your database connection information.
8. Save the file as wp-config.php
9. Download everything.
10. Open http://(the name of your site is also the name of the folder in the home folder, in this article the folder name is inestkal.ru)/wp-admin/install.php in the browser. This script will create the tables needed for your blog. If an error occurs, double-check your wp-config.php file and try again.
11. Remember the password given to you.
12. The installation script install.php will redirect you to the login page. Log in as admin with the password you created during installation. You can click on "Profile" to change your password.

This way you can create a test site on any engine.

Now how to populate this test site with data from another WordPress site

We continue the numbering of steps that we started

13. Using an FTP client, copy the public_html folder from the site to your computer
14. Using regular Windows Explorer, copy the public_htmlwp-contentplugins folder of the copied site to the homeinestkal.ruwwwwp-contentplugins folder
15. Using regular Windows Explorer, copy the public_htmlwp-contentthemes folder of the copied site to the homeinestkal.ruwwwwp-contentthemes folder
16. In your browser, type http://inestkal.ru/wp-admin/themes.php in the address bar and activate the same theme that is active on the copied site.
17. In your browser, type http://inestkal.ru/wp-admin/plugins.php in the address bar and activate the same plugins that are active on the copied site.
18. In your browser, type http://name of your copied site/wp-admin/export.php in the address bar and click on the “Download export file” button; you need the WordPress format. Save the resulting file in the desired location.
19. In your browser, type http://inestkal.ru/wp-admin/import.php in the address bar, select the WordPress format, specify the file you just created and click on the “Download and Import File” button. First make sure that its size does not exceed 2MB. If it exceeds, then find the php.ini file in the Denver package and edit it, increasing the required parameter (the system will tell you which one if you try to import a file that is too large).
20. Without changing the settings, just click “Submit” and wait for the database tables to load. If everything goes well, then at the end of the listing there will be the lines: “All done. Have fun! Remember to update the passwords and roles of imported users." It is better to download underloaded auxiliary files (pictures, files, etc.) separately, using steps 21 and 22. But if the process is interrupted, you will have to delete the table and repeat all the steps, starting from step 2. You can also simply repeat the loading process many times into the same tables, but then the data on which there was an interruption will be loaded incorrectly and they will all need to be double-checked and edited manually.
21. Using a regular Windows Explorer, copy the public_htmlwp-contentuploads folder of the copied site to the homeinestkal.ruwwwwp-contentuploads folder, replacing the moved files if the names match.
22. If you are using the WP-DownloadManager plugin, then you need to copy its already downloaded files: using a regular Windows Explorer, copy the public_htmlwp-contentfiles folder of the copied site to the homeinestkal.ruwwwwp-contentfiles folder

The second way to create a copy of the site

points 1-5 are the same.

then point 13 is the same as above.

14. Using regular Windows Explorer, copy the entire contents of the public_html folder to the homeinestkal.ruwww folder

15. Then copy the WordPress distribution on top of these files into the homeinestkal.ruwww folder

Then follow steps 7-12

Then step 16 - 18 (activate the theme and plugins)

Then, under the same IDs, define the download files for the WP-DownloadManager plugin (if used)

Then paragraphs 19-20.

With this alternative method there will most likely be fewer problems.

The third way to create a copy of the site

If the second method did not give an accurate result (for some reason, for example, some pages did not load or other problems), then you can try the following.

Go to the phpMyAdmin panel of the source site and export MySQL database tables. The file will look like DatabaseName.sql or DatabaseName.sql.zip (it matters whether you archive it or not), where “BaseName” is the name of the database that was once given when creating the site, you can see it in the wp- file config.php original (copied) site.

Then go to http://localhost/Tools/phpmyadmin/ in your browser, open (select) the database in which the site will be located (in our example it is named testwp, see point 3). Clear it of all tables. And expand the archive into it from the “Import” tab. When everything works out, pay attention to the number of records in the created tables, check them with the source site - it should be the same.

This third method is better than the first and second in that the list of site users is restored in this way. The login and password for entering will be the same as in the original case, including the administrator. However, the disadvantage of this method is that all links to the original site will be incorrect. And this too will have to be dealt with somehow.

Transferring a site to another hosting

  1. Clear the database of drafts, spam, etc. - see http://www.site/?p=1129
  2. Disable all plugins of the migrated site in the WordPress console
  3. Make an export database file in the WordPress console
  4. Download from http://ru.wordpress.org/releases/#older a version of the same WordPress release on which the site is located.
  5. In the phpMyAdmin panel, export the database to a file; just in case, it is better to select the “MYSQL40” compatibility mode.
  6. Copy the public_html folder to your computer via ftp.
  7. On the new hosting, create a new MySQL database and remember its parameters.
  8. On the new hosting, in the phpMyAdmin panel, import the database from the file made in step 5.
  9. Via ftp, copy the public_html folder from your computer (see step 6) to the new hosting.
  10. Copy to the new hosting a distribution kit of the same WordPress release on which the site (see point 4) (you can immediately unzip it, placing the distribution files on top of the files copied earlier (in point 8)
  11. On the new hosting, edit the wp-config.php file (using Notepad++) taking into account the new database parameters that were memorized in step 7.
  12. Open http://(name of your site on the new hosting)/wp-admin/install.php in your browser - WordPress will be installed.
  13. Activate the desired theme.
  14. Activate plugins.
  15. Check the content of the site to see if everything was transferred and installed correctly. If the site name has been changed on the new hosting, you may need to edit the WordPress theme used.
  16. Check the site identification files with Yandex and Google to see if they recognize the new location, you may have to delete them and get new identification links.
Posted in Tagged #

PhpMyAdmin is an interface that allows us to work with the database. MySql database is the main tool for creating dynamic websites.
The principle of operation is as follows: an HTML framework of the site is created and information is output from the database to certain places in the framework (for example, in the main content area) using PHP scripts, which forms the content of the site.
And in this article we will learn how to create databases on a local computer using Denver.

So, let's launch Denver and go deeper into the wilds ().

To launch we use the shortcut Start Denwer.

In the address bar of the browser we type the usual http://localhost.

Scroll the loaded page to the list of links.

Clicking on it will download, you won’t believe it, the program phpMyAdmin.

First we need to create a user for the database. The user has certain privileges (can edit, delete, create new tables and positions in the database) and is authorized using a given login and password.

When you purchase hosting from most hosting providers, a database and user account with a login and password that has all the necessary privileges are automatically created for you. On a normal hosting there is exactly the same phpMyAdmin through which you can manage tables and their contents, as well as import data from the local database to the hosting database. The login and password for accessing the database, as well as a link to phpMyAdmin, are sent by the hosting provider to your e-mail.

On the local computer, we will have to create the user ourselves.

Click on the link " Privilege" in the window phpMyAdmin and we get to a page listing all database user accounts.

On the page " Privilege"click on the link" Add a new user».

On the page for adding a user, enter your username and password and select all the privileges, why bother with trifles.

Press the button " I went"and if everything is OK, then we see confirmation of the creation of a new user.

Now, when we work with a PHP script and connect to the database using it, we will need to use the username and password specified when creating it (the main thing is not to forget what we wrote there when creating the user).


Let's create a new table in the database for our project

Go to the main page of phpMyAdmin

And right on the main page, enter the name of the new database, click the button “ Create».

That's all, the base has been created.

Information in the database is stored not just like that, but in tables. Therefore, we need to create at least one table with a certain number of fields. To do this, we will use the field “ Create a new table in the database».
Give the table a name and indicate the number of fields in this table.

Let me note this fact: there can be as many tables in the database as desired. And in order to take data from a table, you just need to indicate its name and the field from which the data is retrieved, and then insert it into the required place in the HTML framework using PHP scripts.

After pressing the button I went» the page for creating fields in the database is loaded.

Rice. 1. Creating fields in the table.

Information in the database is stored as follows:

There is a database with a specific name (in our case new_base). The database contains tables; there can be as many of them as desired (in our case, we create a table tablica in the database new_base). Inside the table there are fields with data in cells, their number is set when creating the table (in our case we create 3 fields).

Graphically this matter can be represented as follows:

Any table must contain a service field called primary key field. This field allows us to number the rows in the table and then access a specific row by its value in the primary key field (in our case, the role primary key fields playing field id).

Now that we're done with the theory, let's move on to creating tables in practice.

All text below refers to Fig. 1.

First let's create this much needed primary key field. Our primary key field will be the very first field. Let's go step by step:

1) Give a name to our field, for example id.

2) Select the field type. By default, the field type contains the value VARCHAR– this means untyped data, i.e. VARCHAR– these are any symbols. Text, numbers, letters - that's all VARCHAR. If we choose the type VARCHAR then in the next Length/Value input field you need to specify the maximum number of characters contained in the cell.

Another interesting data type is TEXT. Data type TEXT speaks for itself: the cells of a field of this type can contain any text characters (letters, numbers, spaces, HTML codes, etc.). But unlike the type VARCHAR type text does not need to be specified Lengths/Values. For TEXT the value length is automatically set to 65535 characters, and the input field Lengths/Values should be set empty.

And the last data type we are interested in is INT. In cells, fields like INT can only contain integer values. When specifying a field type INT you must specify the number of characters Lengths/Values.

Other data types are used very rarely. And when you feel the need to use other types of data, you will already be so developed in this direction that you yourself will know what they mean. And at this stage I will modestly keep silent about all the remaining perverted data types.

Now attention– to set the parameters of the primary key field, you must select a data type INT because the cells of this service field will contain integer data (line numbers).

3) For the primary key field we need to change the value Additionally on auto_increment. This is done so that when creating a new row, we do not need to bother entering data into the primary key field; it will be filled in automatically (a unit will be added to the value in the previous row of the primary key field - the Christmas tree increment).

4) And finally we need to put the radio switch in position Primary.

5) If desired, you can specify the value in Attributes UNSIGNED. This value indicates that the cells in this field will contain only positive numbers. This is done to optimize and reduce the memory allocated for variables.

That's all with the primary key field.

Zero– default value not null. This means that the cells of this field cannot be empty but must contain at least some value. If you need to keep the cells of a field empty (it is clear that for a primary key field this situation will arise can not no way) then change the value to null.

A few words about Lengths/Values. For field id 4 is indicated. This means that the cells of this field can contain information of no more than 4 characters (1000; 15; 9999 - can be contained, but 10,000 - cannot). A similar thing for the field info having the type VARCHAR.

Field id can be left empty, since it has the attribute auto_increment and the value 1 will be automatically written into the cell for the first field.

At the bottom of the page I click the button I went and the entry is entered into the database.

You can view the information recorded in the table by clicking on the tab Review.

(Denwer). Today we will continue our lesson from the series “ Installing and configuring a local server Denver (Denwer)" After installing Denver, the next step is to configure it. First of all, let's set up the Denver database. It uses (Free Database Management System) DBMS MySQL. To configure, the local server database is used in Denwer phpMyAdmin.

phpMyAdmin is an open-source utility written in PHP that provides full-fledged, including remote, administration of MySQL databases via a browser.

We launch Denver using the shortcut that is located on the desktop and type http://localhost/tools/ in the browser.

Click on phpMyAdmin and go to the phpMyAdmin Denver home page.

On the left side is a list of available MySQL databases in Denver. I have as many databases here as there are sites installed on Denver. Of course, you can use one database for several sites, giving each site its own prefixes. But if the hosting provider does not limit the number of databases created, it is of course better to create a separate database for each site. A phpMyAdmin Denver allows us to create an unlimited number of databases. To create a database in MySQL in Denver, go to the (databases) tab and enter the name of the database. It is better to enter a clear name so that it is not difficult to understand from the name which site this or that database belongs to. This is important when a large number of databases accumulate. I recommend creating a database with the name of the site so as not to get confused later. The adjacent drop-down menu can be left as default (comparison), or you can select from the drop-down list “ utf8_general_ci" "utf8_general_ci" is the base character set of the "UTF-8" encoding. "UTF-8" is the best encoding option to create a website in. In this case, you will not have problems with encoding, when the Cyrillic alphabet is displayed with question marks and unclear gibberish. This encoding supports both Cyrillic and even Chinese characters. Click (create).

A database with your name will appear in the left item of the phpMyAdmin panel.

Click on the name of our database and get into the database itself. Now we need to create a new user. For this we need the (privileges) tab.

Clicking on this menu takes us to the MySQL accounts page in Denwer. One account is enough for the Denver database, since our local server (localhost) is located on our computer. No one will get to it except us. But for real hosting, it is better to create a separate account. After the users table there is a link “Add user”.

By clicking on it, we go to the pop-up window for adding a new MySQL user to Denwer.

In the first field, enter your username. In the second field “Host”, select “local” from the drop-down menu; as a result, “localhost” will be automatically entered. In the following fields, enter the password as usual. In the “User Database” block we leave everything as it is and go to the “Global Privileges” block. Here we choose what privileges we will give to this user. Since we are the owner of this local server, click on the “Mark all” link and at the bottom click on “Add user”. After successfully adding a new user, again go to the “Privileges” page to make sure that a new user has been added to the Denwer database.

Now we have created the database and we can start installing CMS Joomla.

If you notice an error, select a piece of text and press Ctrl+Enter
SHARE: