My space web page

138 Part II . SQL Essentials Figure 8-6: MySQL uses the username of the current user if the -u switch is not used. Accordingly, if you are using the CLI as the rootuser, MySQL attempts to connect as the rootuser if the -u switch is not used. If you want to override the default user and have the MySQL CLI authenticate as a different user every time, you can add the username=clause to the MySQL configuration file. Cross-For details on how to set and change default variables for the MySQL CLI, see the Reference MySQL CLI Environment Variables section later in this chapter. Specifying the password One source of confusion for some is the use of the -pswitch to specify the password. Often people believe that what follows the -p is actually the password but this isn t always the case. The -pswitch simply tells the mysql program to prompt for the password if none is given. In the example in Figure 8-5, a space appears after the -pswitch it s prompting you for the password. If you want to specify the password on the command line, you can do so by placing the password immediately after the -p switch, as shown in Figure 8-7. Caution Specifying the password on the command line should be considered a security risk because the password is right in plain sight for a would-be attacker to see. Additionally, the –passwordswitch can be substituted for the -p switch and is used much the same way. If you provide just the –passwordswitch you are prompted for the password. However, unlike the -pswitch, the –password syntax requires you to specify the password on the command line by using an equals sign (=), as shown in Figure 8-8.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision web and email hosting services

Leave a Reply