———————————–1.9.2———————————
wget https://storage.googleapis.com/golang/
go1.9.2.linux-armv6l.tar.gz
tar -C /usr/local -xzf
go1.9.2.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
————————-1.8———————————–
wget https://storage.googleapis.com/golang/go1.8.linux-armv6l.tar.gz
tar -C /usr/local -xzf go1.8.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
Compiler (Examples)
your file -> stnc.go
Terminal write
mkdir -p $GOPATH/src/stnc
cd $GOPATH/src/stnc
go get
go build
./stnc
—-CRON
sudo crontab -e
*/25 * * * * /
/src/stnc/stnc
My packages cd /root/go/src/stnc
Debian / UBUNTU Start cron service
sudo /etc/init.d/cron start
OR
sudo service cron start
Mysql
- sudo apt-get update
- sudo apt-get install mysql-server
- mysql_secure_installation
mysql -u root -pyourpassword
CREATE DATABASE crawler;
mysqldump -u root -p crawler < raspi_.sql
OR
mysql -u root -p crawler < raspi_.sql
MYSQL BACKUP (bash )
mysqldump -u root -pyourpassword crawler > tut_backup.sql
mkdir $(date +%Y_%m_%d-%H%M%S)
// ornek klasor açmak için mkdir /home/john/$(date +%M)
Raspian and Diet PI my.cnf file
nano /etc/mysql/mariadb.conf.d/50-server.cnf
https://dba.stackexchange.com/questions/83125/mysql-any-way-to-import-a-huge-32-gb-sql-dump-faster
mysql dump
This error has nothing to do with the php.ini, its clearly an error message from the DBMS.
You can increase the value of the max_allowed_packet in the my.cnf file:
[mysqld]
max_allowed_packet = 128M
After restarting your mysqld it should work (for larger data increase the value more)
If you try to “import with putty”, i guess your are using mysql from command line, in this case you can start mysql with the –max_allowed_packet parameter e.g:
mysql --max_allowed_packet=256M -u root -p sampledb < dump.sql
Alternatively if you source the file from within a running mysql session you can set the parameter by:
set global max_allowed_packet=256M;
last example only is effective till next restart of mysqld, for a permanent solution stick to my first example.
Reset your root MySQL password – Linux
Difficulty: 1
Time: 30 minutes
If you’ve forgotten the root user’s password you created for your MySQL database, you can reset it.
It’s important to note that this user and its password are limited to administrator use. This is not the user or password you should use for everyday use.
Turn off MySQL
Warning: If you have any sites or application that rely on MySQL to function, these will stop working until you turn MySQL back on.
You must turn the MySQL service off to reset the root password. The command you use to turn MySQL off varies depending on your Linux distribution. Choose the command from the table below for the Linux version you are using:
DistributionsCommand
Ubuntu, Debian
sudo service mysql stop
Fedora, CentOS 6
sudo service mysqld stop
CentOS 7
sudo systemctl stop mariadb.service
Arch Linux
sudo systemctl stop mysqld.service
Reset the root password through safe mode
MySQL safe mode lets you change system settings without using the root password.
- Start up safe modesudo mysqld_safe –skip-grant-tablesYou may need to type Enter twice.
- Log into MySQL as root:mysql -u root
- Change to the mysql database, which handles the settings for MySQL itself:use mysql;
- Update the password for the root user:update user set password=PASSWORD(“the new password you want to use”) where User=‘root’;
- Refresh the MySQL user privileges:flush privileges;
- Exit MySQL:exitIf this doesn’t work, you can try force the application to quit by pressing CTRL-C on your keyboard.
Stop and Start MySQL
Now that the password has been reset, you need to stop and start the MySQL service.
- Stop MySQL. Use the table in the “Turn off MySQL section” to find the command.
- Start MySQL:DistributionsCommand
Ubuntu, Debiansudo service mysql start
Fedora, CentOS 6sudo service mysqld start
CentOS 7sudo systemctl start mariadb.service
Arch Linuxsudo systemctl start mysqld.service
- Connect to MySQL again with your root user:mysql -u root -p
- Enter your new password.
That’s it! You should now be able to log into your MySQL console with the root password.
Olası bir sorun
grant all privileges on *.* to ‘root’@’localhost’ identified by ‘passprd gelecek’ with grant option;