1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# Install Build Tools $ pip install scons # Reload Environment $ source ~/.profile # Clone Compute Library $ git clone https://github.com/Arm-software/ComputeLibrary.git # or wget https://www.mobibrw.com/wp-content/uploads/2019/10/ComputeLibrary.zip # Enter ComputeLibrary folder $ cd ComputeLibrary # Build the library and the examples $ scons Werror=1 debug=0 asserts=0 neon=1 opencl=1 examples=1 os=linux arch=armv7a -j4 # Run on the Raspberry Pi $ export LD_LIBRARY_PATH=build/ # Download AlexNet # Install unzip $ sudo apt-get install unzip # Download the zip file with the AlexNet model, input images and labels $ wget https://armkeil.blob.core.windows.net/developer/developer/technologies/Machine%20learning%20on%20Arm/Tutorials/Running%20AlexNet%20on%20Pi%20with%20Compute%20Library/compute_library_alexnet.zip # or wget https://www.mobibrw.com/wp-content/uploads/2019/10/compute_library_alexnet.zip # Create a new folder $ mkdir assets_alexnet # Unzip $ unzip compute_library_alexnet.zip -d assets_alexnet $ PATH_ASSETS=./assets_alexnet $ ./build/examples/graph_alexnet 0 $PATH_ASSETS $PATH_ASSETS/go_kart.ppm $PATH_ASSETS/labels.txt |
每日归档: 2019年10月17日
MySQL 5.7.27创建用户并授权
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
$ mysql -u root -p mysql> use mysql; mysql> select Host,User from mysql.user; # 创建用户并设置密码 mysql> create user "wordpress" identified by "password"; # MySQL 8使用如下命令 # mysql> create user "wordpress" identified with mysql_native_password by "password"; #更改用户访问是外网访问还是只能本地访问 mysql> update mysql.user set Host="localhost" where User="wordpress"; # 更新密码,5.7的数据库使用'authentication_string'字段替代了'Password'字段 mysql> update user set authentication_string=password("pass") where User="wordpress" and Host="localhost"; # MySQL 8 不能使用上面的命令修改密码,只能在创建的时候设置密码,可以先删除再创建 # drop user "wordpress"; # 如果没这一行可能也会报一个错误,因此需要运行这一行 mysql> update user set plugin="mysql_native_password"; mysql> select Host,User from mysql.user; # 授予用户访问Wordpress数据库的权限 mysql> grant all privileges on wordpress.* to "wordpress"@"localhost" identified by "pass"; # MySQL 8使用如下命令 # mysql> grant all privileges on wordpress.* to "wordpress"; # 刷新权限 mysql> flush privileges; |