In Feburary 2016 30,
Open a command prompt window on a Windows computer or a terminal window on a Linux computer.
Type the command 'ftp hostname' to log into the FTP server. Replace 'hostname' with the host name or IP address of the FTP server.
Type the command 'delete dir_name/*' to delete the files within the directory. Replace 'dir_name' with the name of the directory that you want to delete.
Type the command 'rmdir dir_name' to remove the directory.
Type the command 'quit' to close the FTP session.
In Feburary 2016 30,
Showing posts with label prompt. Show all posts
Showing posts with label prompt. Show all posts
Tuesday, 1 March 2016
Saturday, 27 February 2016
How to Send a File to an IP Address With Command PromptIn Feburary 2016 27,
In Feburary 2016 27,
Click 'Start' and type 'run' into the search box. Click on the 'Run' link, then type 'cmd' and press 'Enter.' Click on the new window to select it.
Change the command prompt's current directory to the folder containing the file you want to send by typing the following command:cd '\myFiles\projectA'Replace '\myFiles\projectA' with the full path to the folder containing the file. Press 'Enter.'
Type the following command to launch the command-line FTP client on your prompt:ftp 74.120.4.80Replace '74.120.4.80' with the IP address of the computer where you want to send the file. Press 'Enter.' The FTP client will await your next command on its own command prompt.
Type the following command:put myFile.docReplace 'myFile.doc' with the name of the file you want to send. Press 'Enter.' After a delay that depends on the file's size, the FTP client will return control to you. At that point, the file will have been successfully sent to the remote IP address.
Type the following command:byePress 'Enter.' The FTP client will exit to the usual command prompt.
In Feburary 2016 27,
Click 'Start' and type 'run' into the search box. Click on the 'Run' link, then type 'cmd' and press 'Enter.' Click on the new window to select it.
Change the command prompt's current directory to the folder containing the file you want to send by typing the following command:cd '\myFiles\projectA'Replace '\myFiles\projectA' with the full path to the folder containing the file. Press 'Enter.'
Type the following command to launch the command-line FTP client on your prompt:ftp 74.120.4.80Replace '74.120.4.80' with the IP address of the computer where you want to send the file. Press 'Enter.' The FTP client will await your next command on its own command prompt.
Type the following command:put myFile.docReplace 'myFile.doc' with the name of the file you want to send. Press 'Enter.' After a delay that depends on the file's size, the FTP client will return control to you. At that point, the file will have been successfully sent to the remote IP address.
Type the following command:byePress 'Enter.' The FTP client will exit to the usual command prompt.
In Feburary 2016 27,
Friday, 26 February 2016
How to Update a Column in MySQLIn Feburary 2016 26,
In Feburary 2016 26,
Open MySQL monitor and log in with your username and password.
Select the database you wish to update. For example, to use the database named TARDIS, type in the following at the command prompt:use TARDIS;
Type in the SQL statement to update your column. To update the Date column of a table named 'Destination' where the Location is equal to 'Gallifrey' you can use the following SQL statement:UPDATE DestinationSET Date='2011-11-11'WHERE Location='Gallifrey';If updating more than one column, for example 'Date' and 'Time,' you can use the following statement:UPDATE DestinationSET Date='2011-11-11', Time='11:11:11'WHERE Location='Gallifrey';
Press Enter to submit the changes.
Update Columns Using phpMyAdmin
Open phpMyAdmin and log in.
Click the name of the database you wish to update columns for.
Find the table you'd like to change, and click on the 'Browse' icon next to it.
Put a check mark on all the records that need to be updated and click on the pencil icon or the 'Change' icon.
Edit the text on all the columns you wish to update and click on 'Go.'
In Feburary 2016 26,
Open MySQL monitor and log in with your username and password.
Select the database you wish to update. For example, to use the database named TARDIS, type in the following at the command prompt:use TARDIS;
Type in the SQL statement to update your column. To update the Date column of a table named 'Destination' where the Location is equal to 'Gallifrey' you can use the following SQL statement:UPDATE DestinationSET Date='2011-11-11'WHERE Location='Gallifrey';If updating more than one column, for example 'Date' and 'Time,' you can use the following statement:UPDATE DestinationSET Date='2011-11-11', Time='11:11:11'WHERE Location='Gallifrey';
Press Enter to submit the changes.
Update Columns Using phpMyAdmin
Open phpMyAdmin and log in.
Click the name of the database you wish to update columns for.
Find the table you'd like to change, and click on the 'Browse' icon next to it.
Put a check mark on all the records that need to be updated and click on the pencil icon or the 'Change' icon.
Edit the text on all the columns you wish to update and click on 'Go.'
In Feburary 2016 26,
Thursday, 25 February 2016
How to Allow Remote Access to IIS 7In Feburary 2016 25,
In Feburary 2016 25,
Click 'Start' and click 'Server Manager.'
Click 'Roles' in the window that appears, and then click on 'Web Server (IIS)' in the prompt that appears.
Click 'Add Role Services' and click 'Management Service' from the options that appear.
Click the server you want to add remote connectivity to from the server window.
Click the 'Management Service' section, and then click 'Enable remote connections.'
In Feburary 2016 25,
Click 'Start' and click 'Server Manager.'
Click 'Roles' in the window that appears, and then click on 'Web Server (IIS)' in the prompt that appears.
Click 'Add Role Services' and click 'Management Service' from the options that appear.
Click the server you want to add remote connectivity to from the server window.
Click the 'Management Service' section, and then click 'Enable remote connections.'
In Feburary 2016 25,
Wednesday, 24 February 2016
How to Change a Directory in FTPIn Feburary 2016 24,
In Feburary 2016 24,
Open the Start menu and click on the 'Run' button.
Type 'cmd' into the text field and hit the 'Enter' key. A command prompt window will now open on the screen.
Type 'ftp server.com' into the command prompt window, replacing 'server.com' with the address of your FTP server, and hit 'Enter.'
Enter your FTP username and password when prompted to log in to the server.
Type 'cd' followed by the path of the directory that you want to switch to and hit 'Enter.' The 'cd' command stands for change directory, and if you provide a valid directory path to change to, you will receive a confirmation message.
In Feburary 2016 24,
Open the Start menu and click on the 'Run' button.
Type 'cmd' into the text field and hit the 'Enter' key. A command prompt window will now open on the screen.
Type 'ftp server.com' into the command prompt window, replacing 'server.com' with the address of your FTP server, and hit 'Enter.'
Enter your FTP username and password when prompted to log in to the server.
Type 'cd' followed by the path of the directory that you want to switch to and hit 'Enter.' The 'cd' command stands for change directory, and if you provide a valid directory path to change to, you will receive a confirmation message.
In Feburary 2016 24,
Thursday, 18 February 2016
How to Enable a Centos FTP ServerIn Feburary 2016 18,
In Feburary 2016 18,
Open a shell 'Terminal' from the 'Applications > Accessories' menu.Switch to the 'root' user by invoking the command 'su' and entering the password for the root account.
Enter the command 'yum install vsftpd.i386' into the text command prompt. Yum will download the VSFTPD installer and install it.
Answer 'Y' when asked to confirm the installation of the VSFTPD package.Answer 'Y' If you are asked to confirm the installation of a GPG key. This will only happen the first time that you use Yum.
Exit the 'root' user shell by typing 'exit.' Close the terminal window with the 'X' in the top corner of the window.
Start VSFTPD
Open the 'Services' application from the 'System > Administration' menu.Enter the 'root' administrator user's password when requested to do so.
Scroll to the bottom of the list of available services and locate 'vsftpd.'
Check the box next to 'vsftpd' and click 'Start' at the top of the window. VSFTPD is now running.
Click 'Save' at the top of the 'Services' window. The VSFTPD process will now start whenever CentOS is rebooted. You can now move files to and from this computer using an FTP client program on other computers on your network.
In Feburary 2016 18,
Open a shell 'Terminal' from the 'Applications > Accessories' menu.Switch to the 'root' user by invoking the command 'su' and entering the password for the root account.
Enter the command 'yum install vsftpd.i386' into the text command prompt. Yum will download the VSFTPD installer and install it.
Answer 'Y' when asked to confirm the installation of the VSFTPD package.Answer 'Y' If you are asked to confirm the installation of a GPG key. This will only happen the first time that you use Yum.
Exit the 'root' user shell by typing 'exit.' Close the terminal window with the 'X' in the top corner of the window.
Start VSFTPD
Open the 'Services' application from the 'System > Administration' menu.Enter the 'root' administrator user's password when requested to do so.
Scroll to the bottom of the list of available services and locate 'vsftpd.'
Check the box next to 'vsftpd' and click 'Start' at the top of the window. VSFTPD is now running.
Click 'Save' at the top of the 'Services' window. The VSFTPD process will now start whenever CentOS is rebooted. You can now move files to and from this computer using an FTP client program on other computers on your network.
In Feburary 2016 18,
Sunday, 14 February 2016
Access 2007 Automatic BackupIn Feburary 2016 14,
In Feburary 2016 14,
Access 2007's included backup feature saves a copy of the currently active database. To open this feature, click the 'Office' button. Highlight 'Manage' and click on 'Back Up Database.' The program will prompt you to choose a backup location and file name.
Automatic Backup
For users who need automatic backup, Windows includes a tool for backing up the specified data on a user-defined schedule. Type 'Backup and Restore' into the 'Start' menu search to open this feature in Windows 7 or Vista. In XP, click the 'Start' menu and navigate to the 'Accessories/System Tools' folder, then click on 'Backup.'
Other Options
Third-party backup programs also work with Access 2007 database files, and may offer additional options, such as online storage. Some computer manufacturers include backup software with new systems, such as the HP Backup and Recovery Manager or Dell DataSafe.
In Feburary 2016 14,
Access 2007's included backup feature saves a copy of the currently active database. To open this feature, click the 'Office' button. Highlight 'Manage' and click on 'Back Up Database.' The program will prompt you to choose a backup location and file name.
Automatic Backup
For users who need automatic backup, Windows includes a tool for backing up the specified data on a user-defined schedule. Type 'Backup and Restore' into the 'Start' menu search to open this feature in Windows 7 or Vista. In XP, click the 'Start' menu and navigate to the 'Accessories/System Tools' folder, then click on 'Backup.'
Other Options
Third-party backup programs also work with Access 2007 database files, and may offer additional options, such as online storage. Some computer manufacturers include backup software with new systems, such as the HP Backup and Recovery Manager or Dell DataSafe.
In Feburary 2016 14,
Saturday, 13 February 2016
How to Disable a Screen Saver Via a Command LineIn Feburary 2016 13,
In Feburary 2016 13,
Press the Windows logo key and 'R' simultaneously on your keyboard.
Type 'CMD' and press 'Enter.' This loads your Command Prompt.
Type the following command and press your 'Enter' key.REG ADD 'HKCU\Control Panel\Desktop' /v ScreenSaveActive /t REG_SZ /d 0 /fNote, do not copy and paste this command, as it will not work. To undo this change replace the '0' with a '1'.
Type 'Exit' and press 'Enter' after you see 'The operation completed successfully' message.
In Feburary 2016 13,
Press the Windows logo key and 'R' simultaneously on your keyboard.
Type 'CMD' and press 'Enter.' This loads your Command Prompt.
Type the following command and press your 'Enter' key.REG ADD 'HKCU\Control Panel\Desktop' /v ScreenSaveActive /t REG_SZ /d 0 /fNote, do not copy and paste this command, as it will not work. To undo this change replace the '0' with a '1'.
Type 'Exit' and press 'Enter' after you see 'The operation completed successfully' message.
In Feburary 2016 13,
Tuesday, 9 February 2016
How to Disable Sites in Apache 2In Feburary 2016 09,
In Feburary 2016 09,
Verify that the site is still enabled. From the Ubuntu Linux command line, issue the following commands:cd \etc\apache2\sites-enabledlsThe first command switches the working directory to the 'sites-enabled' sub-directory. The second command lists the files in the directory. If there is a file for the site you want to disable, continue with Step 2. If not, the site already is disabled.
Issue the following commands at the Ubuntu command prompt:cd (changes to your home directory)sudo a2dissite sitename (where 'sitename' is the name of the site you want to disable) This command removes 'sitename' from the /etc/apache2/sites-available sub-directory.
Verify that the site has been removed from the list of enabled sites with the following command:ls /etc/apache2/sites-enabledYour site should not appear in the sub-directory listing.
Restart the Apache 2 Web server with the following command:sudo /etc/init.d/apache2 restartThis causes Apache 2 to stop listening for requests for the disabled site.
Start a browser session and attempt to navigate to the site. If your site is disabled, you should get a 'Not Found' message on a default error page.
In Feburary 2016 09,
Verify that the site is still enabled. From the Ubuntu Linux command line, issue the following commands:cd \etc\apache2\sites-enabledlsThe first command switches the working directory to the 'sites-enabled' sub-directory. The second command lists the files in the directory. If there is a file for the site you want to disable, continue with Step 2. If not, the site already is disabled.
Issue the following commands at the Ubuntu command prompt:cd (changes to your home directory)sudo a2dissite sitename (where 'sitename' is the name of the site you want to disable) This command removes 'sitename' from the /etc/apache2/sites-available sub-directory.
Verify that the site has been removed from the list of enabled sites with the following command:ls /etc/apache2/sites-enabledYour site should not appear in the sub-directory listing.
Restart the Apache 2 Web server with the following command:sudo /etc/init.d/apache2 restartThis causes Apache 2 to stop listening for requests for the disabled site.
Start a browser session and attempt to navigate to the site. If your site is disabled, you should get a 'Not Found' message on a default error page.
In Feburary 2016 09,
How to Add an Administrator Account to Cisco RoutersIn Feburary 2016 09,
In Feburary 2016 09,
Connect a computer to a Cisco router using a Cisco serial or universal serial bus (USB) data cable.
Log in to the Cisco router as the administrator.
Enter the privileged EXEC mode. Access this mode by typing 'enable' or 'en' at the 'Router>' prompt.
Access the global configuration mode. Type 'configure terminal' or 'config t' at the 'Router#' prompt.
Add an administrative user. Type the following command at the 'Router(config)#' prompt, and then press 'Enter' on your computer's keyboard: 'username
priv 15 password
'For example, you could type 'username jdoe priv 15 password johnnydoe22,' which would create a user name 'jdoe' with a password 'johnnydoe22.'
Exit to the privileged EXEC mode. Press 'CTRL Z' until you're back at the 'Router#' prompt.
Save your changes. Type 'copy running-config startup-config,' and press the 'Enter' key on your computer's keyboard.
In Feburary 2016 09,
Connect a computer to a Cisco router using a Cisco serial or universal serial bus (USB) data cable.
Log in to the Cisco router as the administrator.
Enter the privileged EXEC mode. Access this mode by typing 'enable' or 'en' at the 'Router>' prompt.
Access the global configuration mode. Type 'configure terminal' or 'config t' at the 'Router#' prompt.
Add an administrative user. Type the following command at the 'Router(config)#' prompt, and then press 'Enter' on your computer's keyboard: 'username
priv 15 password
'For example, you could type 'username jdoe priv 15 password johnnydoe22,' which would create a user name 'jdoe' with a password 'johnnydoe22.'
Exit to the privileged EXEC mode. Press 'CTRL Z' until you're back at the 'Router#' prompt.
Save your changes. Type 'copy running-config startup-config,' and press the 'Enter' key on your computer's keyboard.
In Feburary 2016 09,
Labels:
access,
Configuration,
enable,
Enter,
EXEC,
global,
mode,
privileged,
prompt,
typing
Monday, 8 February 2016
How to Remove a File From an FTP SiteIn Feburary 2016 08,
In Feburary 2016 08,
Click the Start button and click 'Run' to open a Run command box.
Type 'command' in the Run box, and press 'Enter.' Doing so will open a command prompt window.
Type 'ftp' in the command prompt window, followed by either the hostname or IP address of the FTP site you wish to log in to. If the site requires a user name and password for access, then you will be prompted to enter your login information.
Type 'cd' followed by the name of the directory on the FTP server that contains the file that you wish to delete.
Type 'delete,' followed by the name of the file that you wish to delete off the remote server. If the FTP site administrator has provided you with the appropriate file permissions to delete the file, then the file will be permanently removed from the server. If you don't have appropriate permissions to delete files on the server then you'll need to contact the FTP site's administrator for permission.
Type 'bye', and press 'Enter' to end your FTP connection.
In Feburary 2016 08,
Click the Start button and click 'Run' to open a Run command box.
Type 'command' in the Run box, and press 'Enter.' Doing so will open a command prompt window.
Type 'ftp' in the command prompt window, followed by either the hostname or IP address of the FTP site you wish to log in to. If the site requires a user name and password for access, then you will be prompted to enter your login information.
Type 'cd' followed by the name of the directory on the FTP server that contains the file that you wish to delete.
Type 'delete,' followed by the name of the file that you wish to delete off the remote server. If the FTP site administrator has provided you with the appropriate file permissions to delete the file, then the file will be permanently removed from the server. If you don't have appropriate permissions to delete files on the server then you'll need to contact the FTP site's administrator for permission.
Type 'bye', and press 'Enter' to end your FTP connection.
In Feburary 2016 08,
Sunday, 7 February 2016
How to Configure VSFTPDIn Feburary 2016 07,
In Feburary 2016 07,
Open a Terminal Window. The terminal window will be found in the operating system's main 'Application' menu, under either 'System Tools' or 'Utilities.' You will be presented with a command prompt where you will type the following commands.
Type the command 'su' to switch to the root user.
Type the command 'gedit /etc/vsftpd/vsftpd.conf' to edit the main configuration file.
Make the appropriate changes. For example, if you do not want anonymous access set 'anonymous_enable=NO.' Also, if you want local users to be able to log in, remove the comment symbol (#) before 'local_enable.'
Save and close the file.
Type '/etc/initd/vsftpd restart' to restart the vsftpd daemon.
Type 'exit' to exit the root session.
In Feburary 2016 07,
Open a Terminal Window. The terminal window will be found in the operating system's main 'Application' menu, under either 'System Tools' or 'Utilities.' You will be presented with a command prompt where you will type the following commands.
Type the command 'su' to switch to the root user.
Type the command 'gedit /etc/vsftpd/vsftpd.conf' to edit the main configuration file.
Make the appropriate changes. For example, if you do not want anonymous access set 'anonymous_enable=NO.' Also, if you want local users to be able to log in, remove the comment symbol (#) before 'local_enable.'
Save and close the file.
Type '/etc/initd/vsftpd restart' to restart the vsftpd daemon.
Type 'exit' to exit the root session.
In Feburary 2016 07,
How to Install a WordPress Blog to an Amazon S3 CloudIn Feburary 2016 07,
In Feburary 2016 07,
Sign in to your Amazon Web Services account. If you do not have one yet, you can signup for free.
Click on 'Products' in the main navigation menu and then click the 'Amazon Elastic Compute Cloud (EC2)' link. Choose a pricing plan, if desired, or proceed with the free tier. The free option is typically enough to handle a standard blog.
Enter your phone number on the verification page. Amazon will call the number and play through a recorded prompt which will ask you to enter a 4-digit PIN number displayed on the resulting page. Amazon uses this as a form of human verification to help combat fraud. When your PIN is accepted, the page will refresh to confirm your subscription. Click 'Continue,' then click 'Complete Sign-Up.'
Access your control panel by clicking on the 'Sign in to the AWS Management Console' link at the top of the Amazon Web Services page. Click the link to enter your EC2 Console Dashboard and select 'US West' from the region menu. Click on 'Launch Instance' to start up your server.
Click on the 'Microsoft AMIs' tab, enter 'Microsoft Web Platform' in the search field and hit 'Enter.' The resulting page will list the available images you can install. Select the WordPress image and follow the prompts to begin the installation. You will be asked to enter or select configuration details. It is recommended that you start with only one instance, and choose the 'small' instance type. When asked to configure your instance, leave the defaults set and continue to the next step.
Enter a name on the 'Create a Key Pair' page and click 'Create & Download Your Key Pair.' This file acts like a certificate in order to authenticate you to the S3 cloud. Store it in an easy-to-find and safe location on your computer.
Continue to the next step and click 'Create a new Security Group.' Select HTTP, HTTPS, MySQL, and RDP, and click 'Add Rule' for each. These settings allow you to administrate your server and Web space remotely, and for visitors to access your website. Continue to the next page and click 'Launch.' Click 'Close' on the confirmation page.
In Feburary 2016 07,
Sign in to your Amazon Web Services account. If you do not have one yet, you can signup for free.
Click on 'Products' in the main navigation menu and then click the 'Amazon Elastic Compute Cloud (EC2)' link. Choose a pricing plan, if desired, or proceed with the free tier. The free option is typically enough to handle a standard blog.
Enter your phone number on the verification page. Amazon will call the number and play through a recorded prompt which will ask you to enter a 4-digit PIN number displayed on the resulting page. Amazon uses this as a form of human verification to help combat fraud. When your PIN is accepted, the page will refresh to confirm your subscription. Click 'Continue,' then click 'Complete Sign-Up.'
Access your control panel by clicking on the 'Sign in to the AWS Management Console' link at the top of the Amazon Web Services page. Click the link to enter your EC2 Console Dashboard and select 'US West' from the region menu. Click on 'Launch Instance' to start up your server.
Click on the 'Microsoft AMIs' tab, enter 'Microsoft Web Platform' in the search field and hit 'Enter.' The resulting page will list the available images you can install. Select the WordPress image and follow the prompts to begin the installation. You will be asked to enter or select configuration details. It is recommended that you start with only one instance, and choose the 'small' instance type. When asked to configure your instance, leave the defaults set and continue to the next step.
Enter a name on the 'Create a Key Pair' page and click 'Create & Download Your Key Pair.' This file acts like a certificate in order to authenticate you to the S3 cloud. Store it in an easy-to-find and safe location on your computer.
Continue to the next step and click 'Create a new Security Group.' Select HTTP, HTTPS, MySQL, and RDP, and click 'Add Rule' for each. These settings allow you to administrate your server and Web space remotely, and for visitors to access your website. Continue to the next page and click 'Launch.' Click 'Close' on the confirmation page.
In Feburary 2016 07,
How to Stop FTP TransferIn Feburary 2016 07,
In Feburary 2016 07,
Click the 'Start' button in Windows XP/Vista. Click 'Run' (only Windows XP). Then type 'cmd' and press 'Enter.' A new window with a black background (MS-DOS command prompt) will appear.
In Linux, right-click on Desktop and select 'open terminal' in the pop-up menu to open a new terminal.
Type 'ftp
' or ftp '
' followed by pressing 'Enter' (e.g., 'ftp blue.red.edu').
Type '
' (press 'Enter'); then type ' ' (press 'Enter') to access the ftp server. Note: An FTP command prompt ('ftp>') should appear.
Type either 'get
' or 'put
' followed by pressing 'Enter' to download or upload a file.
Press a 'Ctrl+C' key combination on the keyboard to stop the file transfer in progress. Note: Immediately after that, the FTP command prompt should appear.
Repeat Step 4 or type 'quit' and press 'Enter' to close the ftp connection.
In Feburary 2016 07,
Click the 'Start' button in Windows XP/Vista. Click 'Run' (only Windows XP). Then type 'cmd' and press 'Enter.' A new window with a black background (MS-DOS command prompt) will appear.
In Linux, right-click on Desktop and select 'open terminal' in the pop-up menu to open a new terminal.
Type 'ftp
' or ftp '
' followed by pressing 'Enter' (e.g., 'ftp blue.red.edu').
Type '
' (press 'Enter'); then type ' ' (press 'Enter') to access the ftp server. Note: An FTP command prompt ('ftp>') should appear.
Type either 'get
' or 'put
' followed by pressing 'Enter' to download or upload a file.
Press a 'Ctrl+C' key combination on the keyboard to stop the file transfer in progress. Note: Immediately after that, the FTP command prompt should appear.
Repeat Step 4 or type 'quit' and press 'Enter' to close the ftp connection.
In Feburary 2016 07,
Wednesday, 3 February 2016
How to Convert SQLite to TextIn Feburary 2016 03,
In Feburary 2016 03,
Load a SQLite database and enter the sqlite3 environment by typing the following text at the command prompt:$ sqlite3 mydb.dbReplace 'mydb.db' with the name of your database. A database with the specified name will be created if none already exists.
Convert a value to the TEXT data type with the 'CAST' expression by typing the following command at the command prompt:$ sqlite3 my_db.db INSERT INTO my_table VALUES(CAST(97 AS TEXT))Replace 'my_table' with the name of your table. In the code, the number 97 is inserted into the table as a TEXT value.
Exit the sqlite3 environment by typing '.quit', '.q' or '.exit.' and pressing the 'Enter' key.
In Feburary 2016 03,
Load a SQLite database and enter the sqlite3 environment by typing the following text at the command prompt:$ sqlite3 mydb.dbReplace 'mydb.db' with the name of your database. A database with the specified name will be created if none already exists.
Convert a value to the TEXT data type with the 'CAST' expression by typing the following command at the command prompt:$ sqlite3 my_db.db INSERT INTO my_table VALUES(CAST(97 AS TEXT))Replace 'my_table' with the name of your table. In the code, the number 97 is inserted into the table as a TEXT value.
Exit the sqlite3 environment by typing '.quit', '.q' or '.exit.' and pressing the 'Enter' key.
In Feburary 2016 03,
Tuesday, 2 February 2016
How to Connect to the MySQL ServerIn Feburary 2016 02,
In Feburary 2016 02,
Connect to a MySQL server running on localhost. The MySQL command-line client's default behavior is to connect to a server running on localhost. This will connect to the server on localhost as the root user with no password. Example:
mysql -u root
Connect to a MySQL server using a password by adding the -p switch. This will connect to localhost as root and prompt you for a password. Example:
mysql -u root -p
Connect to a remote host using the -h switch. A remote host is any server other than localhost. Using the -h switch will connect to a MySQL server running on example.com as root and prompting for a password. Example:
mysql -u root -p -h example.com
Connect to a remote host running on a non-default port, using the -P switch. Note that this command uses a capital P. It should not be confused with the lowercase -p switch, which means prompt for a password. Using the -P switch will connect, as the root user, to a MySQL server running on example.com port 3330 and prompt for a password. Example:
mysql -u root -p -h example.com -P 3330
Connect to a server and use a database. Specify the database to use on the command-line in place of connecting and manually issuing a USE command. It's faster and makes automated scripts work better. Simply add the name of the database onto the end of the MySQL client command-line. This example connects to the database as root and uses the customers database. Example:
mysql -u root -p -h example.com -P 3330 customers
In Feburary 2016 02,
Connect to a MySQL server running on localhost. The MySQL command-line client's default behavior is to connect to a server running on localhost. This will connect to the server on localhost as the root user with no password. Example:
mysql -u root
Connect to a MySQL server using a password by adding the -p switch. This will connect to localhost as root and prompt you for a password. Example:
mysql -u root -p
Connect to a remote host using the -h switch. A remote host is any server other than localhost. Using the -h switch will connect to a MySQL server running on example.com as root and prompting for a password. Example:
mysql -u root -p -h example.com
Connect to a remote host running on a non-default port, using the -P switch. Note that this command uses a capital P. It should not be confused with the lowercase -p switch, which means prompt for a password. Using the -P switch will connect, as the root user, to a MySQL server running on example.com port 3330 and prompt for a password. Example:
mysql -u root -p -h example.com -P 3330
Connect to a server and use a database. Specify the database to use on the command-line in place of connecting and manually issuing a USE command. It's faster and makes automated scripts work better. Simply add the name of the database onto the end of the MySQL client command-line. This example connects to the database as root and uses the customers database. Example:
mysql -u root -p -h example.com -P 3330 customers
In Feburary 2016 02,
How to Flush a Slow Query Log in MySQLIn Feburary 2016 02,
In Feburary 2016 02,
Connect to a remote MySQL server through SSH, or open a terminal window if you are located with the physical server.
Type “cd mysql-data-directory” at the command prompt, replacing mysql-data-directory with the path to the location of the mysql data files on your server. By default, the data directory is located in /var/lib/mysql .
Rename the current log files if you want to keep a copy for analysis, by typing the following at the command line.mv mysql.log mysql.old
mv mysql-slow.log mysql-slow.old
Flush the log files by typing at the command prompt:mysqladmin flush-logsMySQL closes any existing log files, and then reopens them as new files with the same names.
In Feburary 2016 02,
Connect to a remote MySQL server through SSH, or open a terminal window if you are located with the physical server.
Type “cd mysql-data-directory” at the command prompt, replacing mysql-data-directory with the path to the location of the mysql data files on your server. By default, the data directory is located in /var/lib/mysql .
Rename the current log files if you want to keep a copy for analysis, by typing the following at the command line.mv mysql.log mysql.old
mv mysql-slow.log mysql-slow.old
Flush the log files by typing at the command prompt:mysqladmin flush-logsMySQL closes any existing log files, and then reopens them as new files with the same names.
In Feburary 2016 02,
Subscribe to:
Posts (Atom)