部署Tableau Server & Mysql On
部署Tableau Server
在单个机器上安装Tableau
https://onlinehelp.tableau.com/current/guides/everybody-install-linux/en-us/everybody_admin_intro.htm
配置防火墙
Before you install…
如何通过网页登录控制台
Sign in to Tableau Services Manager Web UI
TIPS
add user to sudo group
https://askubuntu.com/questions/7477/how-can-i-add-a-new-user-as-sudoer-using-the-command-line
download file in linux command
command line - How to download a file from a website via terminal? - Ask Ubuntu
tbcmd所在的位置
shell> which tabcmd
shelll> /etc/profile.d/tabcmd.sh
添加初始化的admin账号
tabcmd initialuser ‑‑server localhost:80 ‑‑username
shell> tabcmd initialuser --accepteula ‑‑server 138.68.170.205:808 ‑‑username 'tabuser'
linux 创建用户并添加到sudo
adduser <username>
sudo adduser <username> sudo
or
usermod -aG sudo <username>
tabcmd command not found
shell> source /etc/profile.d/tabcmd.sh
数据库驱动列表
Driver Download | Tableau Software
下载驱动,安装驱动
shell> wget ‘https://downloads.tableau.com/drivers/linux/deb/shell> tableau-driver/tableau-postgresql-odbc_9.5.3_amd64.deb’
shell> sudo gdebi tableau-postgresql-odbc_9.5.3_amd64.deb
动态库无法加载的问题
myodbc-installer: error while loading shared libraries: libodbc.so.2: cannot open shared object file: No such file or directory
mysql
shell> cp bin/* /usr/local/bin
shell> cp lib/* /usr/local/lib
在linux上安装mysql
MySQL :: A Quick Guide to Using the MySQL APT Repository
从这个
https://dev.mysql.com/downloads/repo/apt/
中找到,
shell> wget ‘https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb’
shell> sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
更新apt的包信息
shell> sudo apt-get update
使用下面的命令安装mysql,并启用/查看/关闭 服务
shell> sudo apt-get install mysql-server
shell> sudo service mysql start
shell> sudo service mysql status
shell> sudo service mysql stop
一句话的命令
shell> wget ‘https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb’
shell> sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
shell> sudo apt-get update
shell> sudo service mysql status
连接我刚才安装好的mysql
mysql -h 138.68.170.205 -u root -p
mysql -h localhost -u root -p
linux 查看端口占用情况
ps -aux | grep mysql
查看mysql端口占用情况
mysql -h localhost -u root -p
mysql> show global variables like 'port';
遇到无法连接mysql的情况
ERROR 1130 (HY000): Host '222.93.215.182' is not allowed to connect to this MySQL server
update user set host='138.68.170.205';
sudo service mysql start
设置授权账号
mysql> GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY'mypassword' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'sa'@'%' IDENTIFIED BY'bglass11' WITH GRANT OPTION;
mysql> CREATE USER 'sa'@'%' IDENTIFIED BY 'bglass11';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'sa'@'%';
caching_sha2_password 错误
使用navicat的客户端连接mysql的时候,报下面的错误:
2059 - Authentication plugin ‘caching_sha2_password’ cannot be loaded: dlopen(../Frameworks/caching_sha2_password.so, 2)
两种方法解决这个问题,一个是更新本地的连接mysql的客户端,另一种是更改加密方式。
更新本地navicat客户端,我本地的版本号是:navicat premium 12.0.16,更新到12.0.26支持mysql 8的SHA2 connection.
May 10 2018Navicat for MySQL (macOS) version 12.0.26
- Supported to connect MySQL 8 using SHA2 connection.
第二种:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码
mysql> select host,user,plugin from mysql.user; #查看更改后的结果
mysql> FLUSH PRIVILEGES; #刷新权限
修改之前是:
+-----------+------------------+-----------------------+
| host | user | plugin |
+-----------+------------------+-----------------------+
| % | sa | caching_sha2_password |
修改之后是:
+-----------+------------------+-----------------------+
| host | user | plugin |
+-----------+------------------+-----------------------+
| % | sa | mysql_native_password |