Learning Mysql



Download 4.24 Mb.
View original pdf
Page80/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   76   77   78   79   80   81   82   83   ...   366
Learning MySQL
82 | Chapter 2:
Installing MySQL


tests/
Contains sample Perl programs to connect to the MySQL server and perform various simple database operations.
If you install MySQL using packages provided by your Linux distributions, the directory locations will vary from the standard layout. For example, the executable files—
such as mysqld_safe, mysql, and mysqladmin—are typically installed in /usr/bin/, and the data directory is located at /var/lib/mysql. Similarly, the logfiles maybe stored in the /var/log/mysqld directory, or the main server log maybe the file /var/log/mysql.
Clearly, there’s a trade-off between easy installation using RPM packages and the disparate location of MySQL-related files when the server is installed in this way. The
XAMPP web page has a section under Basic Questions named Where is What?”
which lists the locations of configuration files and components.
Configuring and Controlling the Apache Web Server
For all chapters up through Chapter 12, you will need access to only a MySQL server.
To practice the examples in Chapters 13, 14, and 15, you’ll need an Apache web server with support for the PHP language. In Chapter 18, you’ll learn how to run Perl scripts on a Apache web server.
If you haven’t installed Apache using XAMPP, you should check whether you have
Apache installed and, if so, whether it supports PHP. You should also check whether your PHP engine supports your installation of MySQL.
If you’ve used the XAMPP package, you can relax, knowing that this has been done for you. You also know how to start and stop Apache using the /opt/lampp/lampp script
(Linux), the XAMPP control panel (Windows, or the /Applications/xampp/xamppfiles/
mampp script (Mac OS X. If you’re using Linux and aren’t using XAMPP, you’ll need to ensure that your web server can work with your database server.
Apache is installed as part of the standard Mac OS X configuration, where it’s referred to as Personal Web Sharing. You can configure it from the Sharing section of the System
Preferences window. However, we’ll rely on the XAMPP installation in this book, so go to the Sharing settings and ensure that Personal Web Sharing is switched off.
In this section, we look at how to check that your web server is running, and how to find the directory from which it serves files to your browser. We also explain whereto find the Apache configuration file and error log. Finally, we describe how you can control the Apache web server on a Linux system where you haven’t used XAMPP, and how to check that your web server is correctly configured for the work that you’ll do in this book.
You can test whether a web server is running on your machine by opening a browser
(for example, Firefox, Internet Explorer, or Safari, and typing in the address http://
localhost. If your browser reports that it can’t open this page, you can try to start the

Download 4.24 Mb.

Share with your friends:
1   ...   76   77   78   79   80   81   82   83   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page