Home>

I want to connect to MySQL using Python on AWS
* Currently using the free version of cloud9

I think there are two problems.
[Problem 1]
I have completed the connection with MySQL once, but I can no longer connect to MySQL since I closed the PC and opened it at a later date.
[Problem 2]
AWS capacity is full below

Nothing comes out even if I try to confirm a large capacity using the above.


Code

`` ```
Error message

npm update check failed │ │ Try running with sudo or get access │ │ to the local update config store via │ │ sudo chown -R $USER: $(id -gn $USER) /home/ec2-user/.config │

↑ This message is always displayed.

[Problem 1] ec2-user: ~/environment $sudo service mysqld start MySQL Daemon failed to start. Starting mysqld: [FAILED]

ec2-user: ~/environment $mysql -u root -D test -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/var/lib/mysql/mysql.sock' (2)

[Problem 2] Filesystem Size Used Avail Use% Mounted on devtmpfs 483M 60K 483M 1%/dev tmpfs 493M 0 493M 0%/dev/shm / dev/xvda1 9.8G 9.7G 0 100% /

Corresponding source code
Source code
What I tried

https://qiita.com/acecrc/items/a72992a17968d3d9bc00
https://26gram.com/aws-cloud9-mysql

Supplementary information (FW/tool version, etc.)] (73f0ec6e2cdc77b8e1fe0ca05020745a.png)

Please provide more detailed information here.

  • Answer # 1

    Unfortunately, it is full, so follow the steps to expand the disk or check for files that are consuming space and delete them.

    EBS online expansion method by OS

    There may be other problems, but the biggest problem is that the disk is full first.

    By the way, although it has nothing to do with the question, there is no concept of "free version of Cloud9".
    reference
    [For those who are starting programming&cloud from now on] Let's create a Ruby development environment using AWS Cloud9 ① – AWS account preparation

    Billing specifications
    Use of AWS Cloud9 itself is not subject to billing (= free)
    Server fee (EC2), which is the execution environment of AWS Cloud9, is subject to billing (= paid)
    However, it is free if it is within the free usage frame
    It can be used for a period of 12 months from the creation of a new account, up to 750 hours per month with a free usage tier
    Even if you use it 24 hours a day for a month, you can use it within the free usage frame