Submit web site - Chapter 24 . Running a Linux, Apache, MySQL,

Chapter 24 . Running a Linux, Apache, MySQL, and PHP (LAMP) Server 653 Access to databases within MySQL is managed based on account information stored within the mysql database. As with UNIX systems, the superuser account is named root. The default installation does not set a password on this account, and it creates an anonymous account and a test database that should be removed unless you are certain that you need them: # mysql -u root mysql Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 3 to server version: 4.0.24 Debian-10-log Type help; or h for help. Type c to clear the buffer. mysql> UPDATE user SET Password=PASSWORD( newpassword ) -> WHERE User= root ; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> DELETE FROM user WHERE User = ; Query OK, 2 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> DROP DATABASE test; Query OK, 0 rows affected (0.00 sec) mysql> q Bye The UPDATE command, as used in this example, changes the password for the MySQL root account (replace newpassword with the password you want to use), the DELETE command removes the anonymous user, and the FLUSH command tells the running MySQL server to reload the list of user accounts from the database. Finally, the DROP command removes the test database. How MySQL Databases Are Structured For those who aren t familiar with how a database system is structured, here s a quick introduction: . Databases are the basic organizational block in a database system. Most database systems (including MySQL) are designed to support multiple databases from a single server. This allows separate databases to be created for different users or different functions. . Tables are found within a database. A table is very much like a spreadsheet in that it has rows and columns. Columns define the different types of data that every entry can or must have, and every entry takes the form of a row. A database can hold multiple tables, allowing you to have many different data sets within a single database.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Leave a Reply