Priti's Technical Corner

January 20, 2009

Mysql Questions


Question 1:Which SQL modes are composite modes (have more than one value)?
Answer 1:ANSI

Question 2:How to connect to mysql via command line.
Answer 2:
mysql -uroot -ppassword  Or
mysql –user=root –password=password

Question 3: How to connect to database on different computer
Answer 3:
mysql -u<account> -p<password> -h<computer> Or
mysql –user=root –password=secret –host=comp_name

Question 4:What is SQL mode?
Answer 4:The SQL mode affects behaviors such as identifier quoting and handling of invalid values during data entry.
Question 5:How to find version of mysql?
Answer 5:select VERSION();

Question 6:List all database in mysql
Answer 6:SHOW DATABASES;

Question 7:what is mysqld?
Answer 7:mysqld is MYSQL server deamon.

Question 8: what is difference between BLOB and TEXT datatype?
Answer 8:
BLOB is Binary large object and column assigned as BLOB will be treated as binary strings.
BLOB columns have no character set and sorting/comparison are based on the numeric values
of the bytes in column values.

TEXT columns are treated as non-binary strings.Text columns have character set and values are sorted/compared based on the collation of
the character set.

Create a free website or blog at WordPress.com.