关系型数据库
关系型数据库是依据关系模型来创建的数据库。所谓关系模型就是“一对一、一对多、多对多”等关系模型,关系模型就是指二维表格模型,因而一个关系型数据库就是由二维表及其之间的联系组成的一个数据组织。常见的关系型数据库有:SQLServer ,Oracle ,Mysql等。有了关系型数据库那自然也少不了非关系型数据库,非关系型数据库主要是基于“非关系模型”的数据库,由于关系型数据库太多了,所以一般用“非关系型”来表示其他类型的数据库。非关系型数据库有:redis ,mongodb ,memcached。关系型数据库与非关系型数据库的优缺点
SQL语句
SQL代表结构化查询语言(Structured Query Language)。SQL是用于访问数据库的标准化语言。SQL包含三个部分:
数据定义语言包含定义数据库及其对象的语句,例如表,视图,触发器,存储过程等。
数据操作语言包含允许您更新和查询数据的语句。
数据控制语言允许授予用户权限访问数据库中特定数据的权限。SQL语句
[root@centos01 ~]# mount /dev/cdrom /mnt/
mount: /dev/sr0 写保护,将以只读方式挂载
[root@centos01 ~]# ls /mnt/
CentOS_BuildTag EULA images LiveOS repodata RPM-GPG-KEY-CentOS-Testing-7
EFI GPL isolinux Packages RPM-GPG-KEY-CentOS-7 TRANS.TBL[root@centos01 ~]# yum -y install ncurses-devel cmake[root@centos01 ~]# groupadd mysql
[root@centos01 ~]# useradd -M -s /sbin/nologin -g mysql mysql
[root@centos01 ~]# mount /dev/cdrom /mnt/
mount: /dev/sr0 写保护,将以只读方式挂载[root@centos01 ~]# tar zxf /mnt/mysql-5.5.22.tar.gz -C /usr/src/
[root@centos01 ~]# cd /usr/src/mysql-5.5.22/[root@centos01 mysql-5.5.22]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DSYSCONFDIR=/etc[root@centos01 mysql-5.5.22]# make && make install[root@centos01 mysql-5.5.22]# chown -R mysql:mysql /usr/local/mysql/[root@centos01 mysql-5.5.22]# chmod +x /etc/init.d/mysqld
[root@centos01 mysql-5.5.22]# chkconfig --add mysqld
[root@centos01 mysql-5.5.22]# chkconfig --level 35 mysqld on
[root@centos01 mysql-5.5.22]# cd[root@centos01 ~]# echo "PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile
[root@centos01 ~]# source /etc/profile[root@centos01 ~]# systemctl start mysqld
[root@centos01 ~]# netstat -anptu | grep 3306
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 11683/mysqld
[root@centos01 ~]# netstat -anptu | grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 11683/mysqld[root@centos01 ~]# mysqladmin -uroot password
New password:
Confirm new password:
[root@centos01 ~]# mysql -uroot -ppwd@123[root@centos01 ~]# systemctl stop mysqld[root@centos01 ~]# mysqld_safe --skip-grant-tables --skip-networking &[root@centos01 ~]# mysql -uroot -pwdwmysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)mysql> update mysql.user set password=password('123123') where user='root';
Query OK, 4 rows affected (0.00 sec)
Rows matched: 4 Changed: 4 Warnings: 0[root@centos01 ~]# systemctl start mysqld[root@centos01 ~]# mysql -uroot -p123123
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.22-log Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
2、安装mysql 8.01)解压安装[root@centos02 ~]# ls
anaconda-ks.cfg mysql-8.0.32-el7-x86_64.tar.gz 模板 图片 下载 桌面
initial-setup-ks.cfg 公共 视频 文档 音乐
[root@centos02 ~]# tar zxf ./mysql-8.0.32-el7-x86_64.tar.gz -C /usr/src/
[root@centos02 ~]# mv /usr/src/mysql-8.0.32-el7-x86_64/ /usr/local/mysql[root@centos02 ~]# echo "PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile
[root@centos02 ~]# source /etc/profile[root@centos02 ~]# mysql -V
mysql Ver 8.0.32 for Linux on x86_64 (MySQL Community Server - GPL)[root@centos02 ~]# groupadd mysql
[root@centos02 ~]# useradd -M -s /sbin/nologin -g mysql mysql[root@centos02 ~]# mkdir /usr/local/mysql/data
[root@centos02 ~]# chown -R mysql:mysql /usr/local/mysql/[root@centos02 ~]# vim /etc/my.cnf
[mysqld]
user=mysql //管理服务用户
basedir=/usr/local/mysql/ //mysql安装目录
datadir=/usr/local/mysql/data //mysql数据目录
socket=/tmp/mysql.sock //服务进程
[mysql]
socket=/tmp/mysql.sock //服务进程[root@centos02 ~]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld[root@centos02 ~]# chmod +x /etc/init.d/mysqld
[root@centos02 ~]# chkconfig --add mysqld
[root@centos02 ~]# chkconfig --level 35 mysqld on[root@centos02 ~]# mysqld --initialize-insecure
2023-02-24T16:16:21.115593Z 0 [System] [MY-013169] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.0.32) initializing of server in progress as process 2079
2023-02-24T16:16:21.121630Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-02-24T16:16:22.189335Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-02-24T16:16:23.254304Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.[root@centos02 ~]# systemctl start mysqld
[root@centos02 ~]# netstat -anptu | grep mysqld
tcp6 0 0 :::33060 :::* LISTEN 2283/mysqld
tcp6 0 0 :::3306 :::* LISTEN 2283/mysqld[root@centos02 ~]# mysqladmin -uroot password
New password:
Confirm new password:
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safetymysql> alter user root@'localhost' identified by 'pwd@1234';
Query OK, 0 rows affected (0.00 sec)[root@centos02 ~]# mysql -uroot -ppwd@1234
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.32 MySQL Community Server - GPL
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> create user 'huyan'@'localhost' identified by 'pwd@123';
Query OK, 0 rows affected (0.01 sec)mysql> alter user 'huyan'@'localhost' account lock;
Query OK, 0 rows affected (0.00 sec)mysql> select User,Host,account_locked from mysql.user;
+------------------+-----------+----------------+
| User | Host | account_locked |
+------------------+-----------+----------------+
| huyan | localhost | Y |
| mysql.infoschema | localhost | Y |
| mysql.session | localhost | Y |
| mysql.sys | localhost | Y |
| root | localhost | N |
+------------------+-----------+----------------+
5 rows in set (0.00 sec)mysql> alter user 'huyan'@'localhost' account unlock;
Query OK, 0 rows affected (0.00 sec)mysql> select User,Host,account_locked from mysql.user;
+------------------+-----------+----------------+
| User | Host | account_locked |
+------------------+-----------+----------------+
| huyan | localhost | N |
| mysql.infoschema | localhost | Y |
| mysql.session | localhost | Y |
| mysql.sys | localhost | Y |
| root | localhost | N |
+------------------+-----------+----------------+
5 rows in set (0.00 sec)root@centos02 ~]# systemctl stop mysqld[root@centos02 ~]# mysqld_safe --skip-grant-tables --skip-networking &
[1] 2481
[root@centos02 ~]# 2023-02-24T16:27:56.990261Z mysqld_safe Logging to '/usr/local/mysql/data/centos02.err'.
2023-02-24T16:27:57.006207Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data[root@centos02 ~]# mysql -uroot -pwdad
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 8.0.32 MySQL Community Server - GPL
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)mysql> alter user root@'localhost' identified by '123123';
Query OK, 0 rows affected (0.00 sec)[root@centos02 ~]# systemctl start mysqld
[root@centos02 ~]# mysql -uroot -p123123
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.32 MySQL Community Server - GPL
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.我正在使用i18n从头开始构建一个多语言网络应用程序,虽然我自己可以处理一大堆yml文件,但我说的语言(非常)有限,最终我想寻求外部帮助帮助。我想知道这里是否有人在使用UI插件/gem(与django上的django-rosetta不同)来处理多个翻译器,其中一些翻译器不愿意或无法处理存储库中的100多个文件,处理语言数据。谢谢&问候,安德拉斯(如果您已经在rubyonrails-talk上遇到了这个问题,我们深表歉意) 最佳答案 有一个rails3branchofthetolkgem在github上。您可以通过在Gemfi
我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie
我安装了ruby版本管理器,并将RVM安装的ruby实现设置为默认值,这样'哪个ruby'显示'~/.rvm/ruby-1.8.6-p383/bin/ruby'但是当我在emacs中打开inf-ruby缓冲区时,它使用安装在/usr/bin中的ruby。有没有办法让emacs像shell一样尊重ruby的路径?谢谢! 最佳答案 我创建了一个emacs扩展来将rvm集成到emacs中。如果您有兴趣,可以在这里获取:http://github.com/senny/rvm.el
是否有简单的方法来更改默认ISO格式(yyyy-mm-dd)的ActiveAdmin日期过滤器显示格式? 最佳答案 您可以像这样为日期选择器提供额外的选项,而不是覆盖js:=f.input:my_date,as::datepicker,datepicker_options:{dateFormat:"mm/dd/yy"} 关于ruby-on-rails-事件管理员日期过滤器日期格式自定义,我们在StackOverflow上找到一个类似的问题: https://s
我可以在Azure网站上部署RubyonRails吗? 最佳答案 还没有。目前仅支持.NET和PHP。 关于ruby-on-rails-RubyonRails可以部署在Azure网站上吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/12964010/
文章目录一、概述简介原理模块二、配置Mysql使用版本环境要求1.操作系统2.mysql要求三、配置canal-server离线下载在线下载上传解压修改配置单机配置集群配置分库分表配置1.修改全局配置2.实例配置垂直分库水平分库3.修改group-instance.xml4.启动监听四、配置canal-adapter1修改启动配置2配置映射文件3启动ES数据同步查询所有订阅同步数据同步开关启动4.验证五、配置canal-admin一、概述简介canal是Alibaba旗下的一款开源项目,Java开发。基于数据库增量日志解析,提供增量数据订阅&消费。Git地址:https://github.co
前置步骤我们都操作完了,这篇开始介绍jenkins的集成。话不多说,看操作1、登录进入jenkins后会让你选择安装插件,选择第一个默认的就行。安装完成后设置账号密码,重新登录。2、配置JDK和Git都需要执行路径,所以需要先把执行路径找到,先进入服务器的docker容器,2.1JDK的路径root@69eef9ee86cf:/usr/bin#echo$JAVA_HOME/usr/local/openjdk-82.2Git的路径root@69eef9ee86cf:/#whichgit/usr/bin/git3、先配置JDK和Git。点击:ManageJenkins>>GlobalToolCon
深度学习部署:Windows安装pycocotools报错解决方法1.pycocotools库的简介2.pycocotools安装的坑3.解决办法更多Ai资讯:公主号AiCharm本系列是作者在跑一些深度学习实例时,遇到的各种各样的问题及解决办法,希望能够帮助到大家。ERROR:Commanderroredoutwithexitstatus1:'D:\Anaconda3\python.exe'-u-c'importsys,setuptools,tokenize;sys.argv[0]='"'"'C:\\Users\\46653\\AppData\\Local\\Temp\\pip-instal
我想用这两种语言中的任何一种(最好是ruby)制作一个窗口管理器。老实说,除了我需要加载某种X模块外,我不知道从哪里开始。因此,如果有人有线索,如果您能指出正确的方向,那就太好了。谢谢 最佳答案 XCB,X的下一代API使用XML格式定义X协议(protocol),并使用脚本生成特定语言绑定(bind)。它在概念上与SWIG类似,只是它描述的不是CAPI,而是X协议(protocol)。目前,C和Python存在绑定(bind)。理论上,Ruby端口只是编写一个从XML协议(protocol)定义语言到Ruby的翻译器的问题。生
Ocra无法处理需要“tk”的应用程序require'tk'puts'nope'用奥克拉http://github.com/larsch/ocra不起作用(如链接中的一个问题所述)问题:https://github.com/larsch/ocra/issues/29(Ocra是1.9的"new"rubyscript2exe,本质上它用于将rb脚本部署为可执行文件)唯一的问题似乎是缺少tcl的DLL文件我不认为这是一个问题据我所知,问题是缺少tk的DLL文件如果它们是已知的,则可以在执行ocra时将它们包括在内有没有办法知道tk工作所需的DLL依赖项? 最佳答