1. delete mysql
Sudo apt-get autoremove mysql-serverSudo apt-get remove mysql-common
2. install
Sudo apt-get install mysql-serverSudo apt-get install php5-mysql
Configuration:
The MYSQL we just installed has only one default root user, and there is
-- Monitor whether the index is used
Alter index & index_name monitoring usage;
Alter index & index_name nomonitoring usage;
Select * from v $ object_usage where index_name = & index_name;
-- Calculate the I/O distribution of data files
Select df.
1. query the list of log files used:Select * from v $ log;
2. query the log files of the Group in use:Select * from v $ logfile;
3. Force log switching:Alter system switch logfile;
4. query historical logs:Select * from v $ log_history;
5. Log
1. Try not to use like '%'
2. For like '%' (not starting with %), Oracle can apply the index on colunm
3. For like '%... '(Not ending with %), you can change it to like' % 'in the form of reverse + function index'
Create a test table and Index. Note
1. select an appropriate Oracle optimizer
There are three optimizer types in Oracle:
A. RULE (based on Rules)
B. COST (COST-based)
C. CHOOSE (optional)
Set the default optimizer. You can declare the OPTIMIZER_MODE parameter in the init. ora file,
1. Write Java
2. Use loadjava to import the database. loadjava is under $ Oracle_HOME/bin.
Loadjava-u /@-resolve-v
This method loads sourcecode into the database.
If you have previously loaded the same java program, you must first drop
Dropjava-u /@
Bitand () function
Returns the result of the bitwise and operation of two numeric values.SyntaxBITAND (nExpression1, nExpression2)ParametersNExpression1, nExpression2Specify two values for the AND operation by bit. If nExpression1 AND nExpression2
I used to install MySQL Enterprise Edition in yum in Linux, and I plan to use it recently. I forgot my password.
Okay. Record the password retrieval method.
1. Stop all MySQL Processes
Killall mysqld
2. Start mysql in Safe Mode
Mysqld_safe -- user =
After mysql is compiled and installed in the Linux source code, the installation path is modified. However, an error is reported after the environment variable is set, as follows:
[Root@www.bkjia.com var] # mysqld_safe -- user = mysql &
[1]
According to colleagues, two Oracle clients on linux x86 cannot connect to the oracle database, and the local connection to SQL plus from the server also loses response.Metalink mentioned this as a bug in oracle (4612267 ).
SQL * Plus 10.2.0.1 Hangs,
In the following code, some struct types are unclear, such as THD, st_vio, and pollfd. However, we can see that MySQL uses the Select model to receive client connections. It is also found on the internet that unix_sock refers to the communication
Oracle does not have an auto-increment field, which can be indirectly implemented through sequence + trigger. In cmd, you can log on to sqlplus and run it directly. It usually takes a few steps:
1. Create a data table
Create table Test_Increase
MySQL trigger is only activated by statement. You cannot write two triggers for the same event of the same table. The same event refers to trigger_time + trigger_event in the create trigger. trigger will not be activated because of changes to some
Recently, I encountered a problem in writing the stored procedure. I always encountered an error when using batch data insertion. It was said that the uniqueness constraint was violated. Finally, I checked the stored procedure and found that the
1. Server StatusServer A: 192.168.1.1Server B: 192.168.1.2
2. Create a synchronization userHost Domain A: 192.168.1.2 User Name A: sync_a Password A: aaaHost Domain B: 192.168.1.1 username B: sync_ B password B: bbbAt leastAssign the following
1. final_url after END is an alias
2. UTL_URL.unescape (final_url, 'utf-8') is the decoded url.
3. At the beginning of Oracle10g, the database has built-in regular expressions that comply with the ieee posix (Portable Operating System for Unix)
Logging always assumes that the log of a table is set to NO and it will not generate logs. In fact, the following is not an explanation and experiment of logging.
Logging Introduction
You can perform the following operations in nologging mode:
1.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service