Learning Mysql



Download 4.24 Mb.
View original pdf
Page58/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   54   55   56   57   58   59   60   61   ...   366
Learning MySQL
56 | Chapter 2:
Installing MySQL

as shown in Figure 2-14. Under Windows, executable programs such as mysqld-nt have the extension .exe. You can include the full name and extension, as in mysqld-nt.exe
;
if you leave it out, Windows won’t complain. If the program ends immediately, restart it with the option no-defaults
:
C:\mysql-5.0.22-win32>bin\mysql-nt --no-defaults
This tells the server not to expect an options file. We discuss options files in Chapter You may also be prompted by your firewall software to authorize the server to listen for incoming connections from the network unless you need to allow connections from other computers, it’s a good idea to keep blocking such connections.
Once the program’s started, nothing exciting will happen you’ll just see a blinking cursor this command window will remain open as long as the server is running, so to use any other MySQL command-line programs, you’ll need to open another command- prompt window. Open another command-prompt window and change to the MySQL directory:
C:\> cd C:\mysql-5.0.22-win32
Now, set a password for the database root account (all on one line):
Figure 2-12. Decompressing the compressed package
Installing Under Windows | 57


C:\mysql-5.0.22-win32> bin\mysqladmin --user=root \
password the_new_mysql_root_password
Finally, stop the server by sending the shutdown command:
C:\mysql-5.0.22-win32> bin\mysqladmin --user=root \
--password=the_mysql_root_password shutdown
Figure 2-15 shows the second command-prompt window and the mysqladmin commands we’ve just discussed. Here, we used the password "new root password"
as an example you should choose a password that’s hard to guess. As we’ve got spaces in the password, we’ve enclosed it in quotes. Notice also how the command to shutdown the server has wrapped to the next line this is fine, but don’t press the Enter key until you’ve finished typing the whole command.
Figure 2-13. The Windows compressed-file-extraction dialog window
Figure 2-14. Starting the server in Windows

Download 4.24 Mb.

Share with your friends:
1   ...   54   55   56   57   58   59   60   61   ...   366




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

    Main page