Posts Tagged ‘server’

Ubuntu mysql connect remote server

by on Friday, July 26th, 2013

Commands For Ubuntu mysql connect remote server

For a client program to be able to connect to the MySQL server, it must use the proper connection parameters, such as the name of the host where the server is running and the user name and password of your MySQL account. Each connection parameter has a default value, but you can override them as necessary using program options specified either on the command line or in an option file (ubuntu mysql connect remote server).

The examples here use the mysql client program, but the principles apply to other clients such as mysqldump, mysqladmin, or mysqlshow.

This command invokes mysql without specifying any connection parameters explicitly:

shell> mysql

Because there are no parameter options, the default values apply:

The default host name is localhost. On Unix, this has a special meaning, as described later.

The default user name is ODBC on Windows or your Unix login name on Unix.

No password is sent if neither -p nor –password is given.

For mysql, the first nonoption argument is taken as the name of the default database. If there is no such option, mysql does not select a default database.

To specify the host name and user name explicitly, as well as a password, supply appropriate options on the command line:

Here is how to write commands for ubuntu mysql connect remote server:

shell> mysql --host=localhost --user=myname --password=mypass mydb

shell> mysql -h localhost -u myname -pmypass mydb

shell> mysql show databases
shell> mysql use database_name

For password options, the password value is optional:

If you use a -p or –password option and specify the password value, there must be no space between -p or –password= and the password following it.

If you use a -p or –password option but do not specify the password value, the client program prompts you to enter the password. The password is not displayed as you enter it. This is more secure than giving the password on the command line. Other users on your system may be able to see a password specified on the command line by executing a command such as ps auxw. See Section, “End-User Guidelines for Password Security”.

As just mentioned, including the password value on the command line can be a security risk. To avoid this problem, specify the –password or -p option without any following password value:

shell> mysql --host=localhost --user=myname --password mydb</pre>
shell> mysql -h localhost -u myname -p mydb

When the password option has no password value, the client program prints a prompt and waits for you to enter the password. (In these examples, mydb is not interpreted as a password because it is separated from the preceding password option by a space.)

Ubuntu stop and start tomcat service

by on Friday, July 26th, 2013

sudo service tomcat stop

sudo service tomcat start

How to Setup Adobe Media Server 5 for Recording

by on Thursday, February 7th, 2013

It is a common seen requirement to use Flash to record audio from browser, like the famous singing search site midomi. These days I did a little survey about this, write down some memo here.

There are a lot of resources introducing how to program in ActionScript to send video/audio stream via RTMP protocol. One particular page I found very useful is this. It gives you out-of-box sample application and full source codes, also with complete related JavaScript sample codes. However the author seems using Red5 server, which I found not maintained as well as AMS(Adobe Media Server). Here are some steps to setup AMS5 to work:

Download AMS5 and install it. An Adobe member account is required. I used Windows version.
Open AMS start page and play with it, default location. Test if video streaming is working.
Open AMS admin console and play with it, default location. Here you can view active connections to the server and log.
Replace the application “live” with an unsigned version: backup all contents under path \applications\live\, then delete them; copy all contents under path \samples\applications\live\ to \applications\live. This is based on instructions in \applications\live\readme.txt.
Open \conf\ams.ini, change the line starting with “LIVE_DIR” to
# LIVE_DIR = C:\Program Files\Adobe\Adobe Media Server 5\applications\live
LIVE_DIR = C:\Program Files\Adobe\Adobe Media Server 5\webroot\live_recorded.
Restart AMS5 service: run “Stop Adobe AMS5″ then “Start Adobe AMS5 in start shortcut group of AMS5.
Open the demo page OR click here mentioned above on the AMS5 machine. Use the “Want to test your Red5 install?” part to test your own FMS setup. Fill in “rtmp://localhost/live” and click “Load” button. It should be able to record and play, the file should be saved under \webroot\live_recorded\ as an .flv file.