--以dba身份登录 C:\Users\Administratorgt;sqlplus / as sysdba --创建用户 SQLgt; create user bfzg0828 identified by bfzg
--以dba身份登录
C:\Users\Administrator>sqlplus / as sysdba
--创建用户
SQL> create user bfzg0828 identified by bfzg0828 default tablespace users quota
unlimited on users;
--授予连接角色,资源角色给用户
SQL> grant connect,resource to bfzg0828;
授权成功。
--授权创建数据链接
SQL> grant create table,create database link to bfzg0828;
授权成功。
--创建目录
SQL> create or replace directory Oracle_exp as 'D:\oracle';
目录已创建。
--在物理机上d盘创建文件oracle
......
--给用户授予目录读写权限
SQL> grant read,write on directory oracle_exp to bfzg0828;
grant read,write on directory oracle_exp to bfzg;
授权成功。
--以bfzg0828用户登陆
SQL> conn bfzg0828/bfzg0828
已连接。
--创建网络数据库链接
SQL> create database link test113 connect to btv10_bz identified by btv10_bz using '192.168.0.66:1521/bttest';
数据库链接已创建。
--查询创建的网络链接
SQL> select * from global_name@test113;
GLOBAL_NAME
-----------------------------------------------
BTTEST
SQL>
--使用expdp导出远程数据库到本地目录d:\oracle\bfzg0828.dmp
C:\Users\Administrator>expdp bfzg0828/bfzg0828@orcl11g directory=DIR_EXP dumpfile=bfzg0828.dmp logfile=bfzg0828.log network_link=test113
--导出成功后,,使用impdp导入到本地库
--这里是新建的用户bfzg用户,拥有connect,resouce角色权限,table_exists_action=replace表示,如果表存在则替换,imp没有功能
impdp bfzg/bfzg directory=oracle_exp dumpfile=BFZG0828.DMP remap_schema=btv10_bz:bfzg exclude=statistics table_exists_action=replace
注btv10_bz为导出用户,bfzg为本次导入用户
BFZG0828.DMP导出用户是btv10_bz(btv10_bz/btv10_bz@192.168.0.66:1521/bttest)
--导入单个表
impdp bfzg/bfzg directory=oracle_exp dumpfile=BFZG0828.DMP tables=btv10_bz.bt_corp remap_schema=btv10_bz:bfzg exclude=statistics table_exists_action=replace
--------------------------------------分割线 --------------------------------------
Ubuntu 14.04下安装MySQL
《MySQL权威指南(原书第2版)》清晰中文扫描版 PDF
Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL
Ubuntu 14.04下搭建MySQL主从服务器
Ubuntu 12.04 LTS 构建高可用分布式 MySQL 集群
Ubuntu 12.04下源代码安装MySQL5.6以及Python-MySQLdb
MySQL-5.5.38通用二进制安装
--------------------------------------分割线 --------------------------------------
本文永久更新链接地址:

Mastering the method of adding MySQL users is crucial for database administrators and developers because it ensures the security and access control of the database. 1) Create a new user using the CREATEUSER command, 2) Assign permissions through the GRANT command, 3) Use FLUSHPRIVILEGES to ensure permissions take effect, 4) Regularly audit and clean user accounts to maintain performance and security.

ChooseCHARforfixed-lengthdata,VARCHARforvariable-lengthdata,andTEXTforlargetextfields.1)CHARisefficientforconsistent-lengthdatalikecodes.2)VARCHARsuitsvariable-lengthdatalikenames,balancingflexibilityandperformance.3)TEXTisidealforlargetextslikeartic

Best practices for handling string data types and indexes in MySQL include: 1) Selecting the appropriate string type, such as CHAR for fixed length, VARCHAR for variable length, and TEXT for large text; 2) Be cautious in indexing, avoid over-indexing, and create indexes for common queries; 3) Use prefix indexes and full-text indexes to optimize long string searches; 4) Regularly monitor and optimize indexes to keep indexes small and efficient. Through these methods, we can balance read and write performance and improve database efficiency.

ToaddauserremotelytoMySQL,followthesesteps:1)ConnecttoMySQLasroot,2)Createanewuserwithremoteaccess,3)Grantnecessaryprivileges,and4)Flushprivileges.BecautiousofsecurityrisksbylimitingprivilegesandaccesstospecificIPs,ensuringstrongpasswords,andmonitori

TostorestringsefficientlyinMySQL,choosetherightdatatypebasedonyourneeds:1)UseCHARforfixed-lengthstringslikecountrycodes.2)UseVARCHARforvariable-lengthstringslikenames.3)UseTEXTforlong-formtextcontent.4)UseBLOBforbinarydatalikeimages.Considerstorageov

When selecting MySQL's BLOB and TEXT data types, BLOB is suitable for storing binary data, and TEXT is suitable for storing text data. 1) BLOB is suitable for binary data such as pictures and audio, 2) TEXT is suitable for text data such as articles and comments. When choosing, data properties and performance optimization must be considered.

No,youshouldnotusetherootuserinMySQLforyourproduct.Instead,createspecificuserswithlimitedprivilegestoenhancesecurityandperformance:1)Createanewuserwithastrongpassword,2)Grantonlynecessarypermissionstothisuser,3)Regularlyreviewandupdateuserpermissions

MySQLstringdatatypesshouldbechosenbasedondatacharacteristicsandusecases:1)UseCHARforfixed-lengthstringslikecountrycodes.2)UseVARCHARforvariable-lengthstringslikenames.3)UseBINARYorVARBINARYforbinarydatalikecryptographickeys.4)UseBLOBorTEXTforlargeuns


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
