https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/boto/pyami/installers/ubuntu/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/boto/pyami/installers/ubuntu/__pycache__/mysql.cpython-310.pyc
o

ckF[��@sXdZddlmZddlZddlZddlmZddlmZddl	Z	dZ
Gdd�de�ZdS)	aR
This installer will install mysql-server on an Ubuntu machine.
In addition to the normal installation done by apt-get, it will
also configure the new MySQL server to store it's data files in
a different location.  By default, this is /mnt but that can be
configured in the [MySQL] section of the boto config file passed
to the instance.
�)�	InstallerN)�ShellCommand)�ConfigParserz�
[MySQL]
root_password = <will be used as MySQL root password, default none>
data_dir = <new data dir for MySQL, default is /mnt>
c@s&eZdZdd�Zddd�Zdd�ZdS)	�MySQLcCs|�d�|jdddd�dS)Nzapt-get updatezapt-get -y install mysql-serverT)�notify�
exit_on_error)�run��self�r�D/usr/lib/python3/dist-packages/boto/pyami/installers/ubuntu/mysql.py�install-s
z
MySQL.installNc
Cs�tj�ddd�}d}td�}|��|��dkrHt�d�d}|�d�dkr>|d	kr>t�d	�|d
}|�d�dkr>|d	ks*|�d�|�d�tj	�
|d
�}tj	�|�s^|�d|�d}|�d|�tdd�}|�
d�|�
d|�|�
d�|�
d|�|�
dtj	�
|d��|��|r�|�d|�|�d
�dSt�}|�d�|�dd�}|�d
�t�d�d|}	|�|	�dkr�t�d	�|�|	�dks�dSdS)Nr�data_dirz/mntFzmysqladmin pingr�
zecho 'quit' | mysql -u root��z/etc/init.d/mysql stopzpkill -9 mysql�mysqlzmkdir %sTzchown -R mysql:mysql %sz/etc/mysql/conf.d/use_mnt.cnf�wz# created by pyami
z# use the %s volume for data
z	[mysqld]
z
datadir = %s
z
log_bin = %s
z
mysql-bin.logzcp -pr /var/lib/mysql/* %s/z/etc/mysql/debian.cnf�client�passwordzrecho "GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '%s' WITH GRANT OPTION;" | mysql)�boto�config�getrr�	getStatus�time�sleep�os�path�join�exists�open�write�close�startr�read)
r
rr�
fresh_install�is_mysql_running_command�i�
mysql_path�fp�
config_parser�
grant_commandrrr�change_data_dir8sJ

�








�zMySQL.change_data_dircCs|��|��dS�N)r
r,r	rrr�maingsz
MySQL.mainr-)�__name__�
__module__�__qualname__r
r,r.rrrrr+s
/r)�__doc__�&boto.pyami.installers.ubuntu.installerrrr�
boto.utilsr�boto.compatrr�
ConfigSectionrrrrr�<module>s

https://t.me/RX1948 - 2025